Date fields default to date typed in when only month and day are entered

  • 1
  • Question
  • Updated 3 years ago
On Date fields when just the month and day are entered "6/5" I want the date picker to automatically default to the current year and date entered.

Currently what happens is it defaults to the current day because that is the day the date the picker is on. I assumed this could only be achieved with javascript so I repurposed a script I found on here with a few tweaks. However, I am not getting the desired results.

My assumption was that limiting the year and using the go to current would only let 2015 save and the day that I actually typed in. Sadly, that is not the case. Any help would be greatly appreciated. 

(function(skuid){



	var $ = skuid.$;



	// Global datepicker settings override for this page


	$.datepicker.setDefaults({


	  changeMonth: true,
	  
	  gotoCurrent: true,

	  changeYear: false,



	});



})(skuid);
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb

Posted 3 years ago

  • 1

Be the first to post a reply!