Welcome to the LimeSurvey Community Forum

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

Changing first month shown in Date Picker?

More
11 years 5 months ago #105975 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.
More
11 years 5 months ago - 11 years 5 months ago #105988 by tpartner
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: 11 years 5 months ago by tpartner.
The following user(s) said Thank You: StuartMark0
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose