Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Changing first month shown in Date Picker?

Changing first month shown in Date Picker? 2 years 9 months ago #105975

Hi Guys,

Does anyone know how to change the default month shown in a date picker? We would like it to show February on opening rather than March (the current month).

Cheers,

Mark
The administrator has disabled public write access.

Changing first month shown in Date Picker? 2 years 9 months ago #105988

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
You should be able to do that with the jQuery UI Datepicker defaultDate option.

Try adding this to the question source:

<script type="text/javascript" charset="utf-8">	
	$(document).ready(function(){
 
		$('#question{QID} .popupdate').datepicker( 'option', 'defaultDate', new Date(2014, 1, 1) );
 
	});
</script>
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 2 years 9 months ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: StuartMark0
Time to create page: 0.205 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form