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

Flatpickr on side-by-side

  • September 1, 2022
  • 4 replies
  • 89 views

Radam
Level 4 ●●●●
Forum|alt.badge.img+33
  • Level 4 ●●●●

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

4 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • September 1, 2022

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


Radam
Level 4 ●●●●
Forum|alt.badge.img+33
  • Author
  • Level 4 ●●●●
  • September 1, 2022

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?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • September 1, 2022

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


Radam
Level 4 ●●●●
Forum|alt.badge.img+33
  • Author
  • Level 4 ●●●●
  • September 1, 2022

THANK YOU!!!