Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SharePoint 2013 Time control in 1 minute increments

$
0
0

Currently, I have a date/time field that is in increments of 5 minutes (default). Is it possible to override the 5 minutes to 1 minute increments? I have the following that was placed on the new and edit form and the dropdown appears to show the 1 minute increments, but when you save the record, it errors out. Can someone assist?

<script type="text/javascript" src="/sites/USAMRAA/cos/imo/SiteAssets/jquery-1.12.4.min.js" language="javascript"></script><script type="text/javascript">
	_spBodyOnLoadFunctionNames.push("ChangeMinuteSelector");
	function ChangeMinuteSelector() {
		jQuery('select[id$="_DateTimeField_DateTimeFieldDateMinutes"]').each(function () {
			var currentSelectedValue = jQuery(this).val();
			jQuery(this).empty();
			for (i=0;i<60;i++)
			{
				var formattedValue = ("0" + i).slice(-2);
				jQuery(this).append('<option value="' + formattedValue + '">' + formattedValue + '</option>');
			}
			jQuery(this).val(currentSelectedValue);
		});
	}</script>


Lee Mossolle


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>