Need help applying date format to Flatpickr | XM Community
Skip to main content
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!
Try this
``
.flatpickr({dateFormat: "m-d-Y"})
``

Leave a Reply