Flatpickr displaying 2121 instead of 2021 | XM Community
Skip to main content

Hello
I am using flatpickr to choose a date in a survey. When the date is in year 2021, flatpickr is populating the field with year 2121. Can anybody help please?
Here is the JS script I am using
 jQuery("#"+this.questionId+" .InputText").eq(8).flatpickr({enableTime: false, altInput: true, altFormat: "m/d/yy", dateFormat: "m/d/yy", minDate:new Date().fp_incr(0), maxDate: new Date().fp_incr(730)});
Thanks,
Bill

image.png

Hi all,
Never mind, I figured it out. I need to use "Y" instead of yy
Thanks



Leave a Reply