JavaScript code - add a calendar and date picker in a Matrix question type | XM Community
Skip to main content

Hello! I am trying to add calendar picker and a time selector (HH:MM: AM or PM to select) in a matrix style question. The following code works well in a form field question:
jQuery("#"+this.questionId+" .InputText.Text").flatpickr({
  dateFormat: "M, j Y"
});
In the text box for the calendar, I added a few lines of code in the JavaScript editor, but when tested, it shows a specific date (7/19/2022). Not sure why, but that's what's happening. What am I doing wrong?
Also need help with the code for a date selector (using a text field in a matrix question).
Thanks in advance.

Be the first to reply!

Leave a Reply