Need help applying date format to Flatpickr | XM Community
Skip to main content
Solved

Need help applying date format to Flatpickr

  • March 15, 2019
  • 1 reply
  • 93 views

Forum|alt.badge.img+5
Can anyone assist me with this. Here is my current code: ``{ /*Place your JavaScript here to run when the page loads*/jQuery("#"+this.questionId+" .InputText").flatpickr(); jQuery("#"+this.questionId+" .InputText").attr("placeholder", "Click Here to Select a Date"); });`` I want the format of the date to be mm/dd/yyyy. I believe I just have to add this string in somewhere but I am not sure where: dateFormat: "M-D-Y" Thanks in advance!

Best answer by dobra021

Try this `` .flatpickr({dateFormat: "m-d-Y"}) ``

1 reply

dobra021
Level 4 ●●●●
Forum|alt.badge.img+37
  • Level 4 ●●●●
  • Answer
  • March 15, 2019
Try this `` .flatpickr({dateFormat: "m-d-Y"}) ``