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

Flatpickr displaying 2121 instead of 2021

  • December 16, 2020
  • 1 reply
  • 7 views

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

Best answer by WIlliamNeal

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


1 reply

  • Author
  • Answer
  • December 16, 2020

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