Flatpickr on side-by-side | XM Community
Skip to main content

We have a hour of operation question and I'd like to use the time function of flatpick to force user to input the time in a specific format. How to I reference the time fields?

Here is the "inspect element" of this question:


Thank you and sorry if this has been covered before, didn't find side-by-side in any searches.

Screen Shot 2022-09-01 at 12.48.45 PM.png

Since ALL the text inputs are times, you can use the class "InputText" to find them.


I apologize but my coding skills are limited to Googling and a tiny bit of edits. I typical call the Flatpickr calendar in the textfield using:
jQuery("#"+this.questionId+" .InputText").eq(4).flatpickr({
  Where do I put the class InputText?


It is already there. Just remove the eq(4):
jQuery("#"+this.questionId+" .InputText").flatpickr({


THANK YOU!!!


Leave a Reply