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

Why is jQuery datepicker plugin not re-initializing on returning to the page?

  • May 1, 2020
  • 2 replies
  • 219 views

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?

Best answer by rondev

Check this

2 replies

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • Answer
  • May 1, 2020

Check this


  • Author
  • May 3, 2020

Thank you! This solved the problem.