Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Changing first month shown in Date Picker?

  • StuartMark0
  • StuartMark0's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 week ago #105975 by StuartMark0
Changing first month shown in Date Picker? was created by StuartMark0
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 topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 1 week ago - 10 years 1 week ago #105988 by tpartner
Replied by tpartner on topic Changing first month shown in Date Picker?
You should be able to do that with the jQuery UI Datepicker defaultDate option .

Try adding this to the question source:

Code:
<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: 10 years 1 week ago by tpartner.
The following user(s) said Thank You: StuartMark0
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose