Why is jQuery datepicker plugin not re-initializing on returning to the page? | XM Community
Skip to main content

Header:


">https://code.jquery.com/ui/1.12.1/jquery-ui.js">

Javascript:
Qualtrics.SurveyEngine.addOnload(function()
{
jQuery("#"+this.questionId+" .InputText").hide();
jQuery(".datePickerMonthYear").datepicker({
   changeMonth: true,
   changeYear: true,
maxDate: 0,
minDate: new Date(1900, 0, 1),
dateFormat: "mm-dd-yy",

yearRange: "1900:+00"
 });

I can select the date the first time I land on the page. But when I use the back button to come back to this page I can no longer select/change the date from the calendar. Should it not initialize on each page load?

Check this


Thank you! This solved the problem.


Leave a Reply