Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

150
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda