Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
flatpickr js keeps reverting date to Jan 1, 2022

I'm using flatpickr as a datepicker in html/js. I pull the module in using jsdelivr:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>

It's been behaving normally for years, but yesterday it started behaving oddly. Here is my javascript, which I have not changed:

$("input[type='datetime'], input[type='datetime-local']").flatpickr({
        enableTime: true,
          altInput: true,
          altFormat: "F j, Y at h:i K",
          dateFormat: "Y-m-d H:i",
        time_24hr: false
      });

And that displays a datepicker like so: source code

When I select a date, the value of the datepicker flatpickr-input class changes to the datetime chosen and the datepicker form-control input class changes its name to datepicker form-control input active. I think that's all expected.

The problem is that when I click a second time (either on another date or outside of the calendar div), the datetime removes my selection and replaces it with 2022-01-01 00:00.

Why is it doing that rather than keeping the value I select?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Having a similar issue, looks like it's with the latest version of 4.6.10. Reverting to 4.6.9 seems to fix the issue.

More here:

https://github.com/flatpickr/flatpickr/issues/2655

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!