Datepicker not working when Qualtrics validation failed (Force response, invalid email etc.) | XM Community
Skip to main content
Solved

Datepicker not working when Qualtrics validation failed (Force response, invalid email etc.)

  • October 1, 2018
  • 1 reply
  • 113 views

YASH1T
QPN Level 2 ●●
Forum|alt.badge.img+6
  • QPN Level 2 ●●
  • 50 replies
in the survey, We have requirement to add a datepicker question ,I have used below code, which is working fine. jQuery("[id='QR~QID59']").datepicker( { dateFormat: 'dd/mm/yy', minDate: '-30d', maxDate: '+0d', changeMonth: true, changeYear: true }); ! There are few more mandatory question on that page. If some one click next button without answering any of those question qualtrics show correct error that answer is missing. But after that when I click on the datepicker textbox datepicker stop functioning (i.e. calendar is not showing). _Note:I don't want to use datepicker question from Qualtrics library Someone faced faced/solved this issue before?

Best answer by Anonymous

Hello @YASH1T , Paste the below code in the js(onReady) of the datepicker question jQuery( "[id='QR~"+this.questionId+"']" ).datepicker({ dateFormat: 'dd/mm/yy', minDate: '-30d', maxDate: '+0d', changeMonth: true, changeYear: true }); Paste the below code in js(onUnload) of the datepicker question `jQuery("#ui-datepicker-div").remove();`

1 reply

  • 0 replies
  • Answer
  • October 1, 2018
Hello @YASH1T , Paste the below code in the js(onReady) of the datepicker question jQuery( "[id='QR~"+this.questionId+"']" ).datepicker({ dateFormat: 'dd/mm/yy', minDate: '-30d', maxDate: '+0d', changeMonth: true, changeYear: true }); Paste the below code in js(onUnload) of the datepicker question `jQuery("#ui-datepicker-div").remove();`