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

274
Visualizações
Flatpickr doesn't open when input field is required in iOS

Been trying to find the cause of this issue but I have an input field for the Flatpickr date time but it doesn't open the native Iphone date picker.

This only happens when the field is required, on Iphone 11 and below versions no matter if it's Safari or Chrome.

Another strange thing is that we have other environments too and the date picker opens up in those but the HTML for the input is the same.

Here's the input html:

<div class="form__field-group u-full-width  dw-mod">
    <div class="u-full-width"> 
        <label for="DateOfBirth" class="u-pull--left">Date Of Birth <span class="required dw-mod">*</span></label>
    </div>
    <input id="DateOfBirth" required="true" name="DateOfBirth" type="hidden" value="2004-01-01" class="u-full-width dw-mod flatpickr-input">
    <input class="u-full-width dw-mod flatpickr-input flatpickr-mobile" step="any" tabindex="1" type="date" required="" placeholder="" value="2004-01-01" max="2004-10-03">
</div>

And the Flatpickr script:

document.addEventListener("DOMContentLoaded", function () {
  flatpickr("#DateOfBirth", {
    mode: 'single',
    maxDate: '1/10/2004 10:03:44 AM'
  });
});

Video of the issues: screencast.com/t/JOnB4CpZvg

Did anyone had the same issue before? How to solve this bug?

Thanks

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Reading the documentation of Flatpickr

You can try to use the config option disableMobile.

disableMobile information: Set disableMobile to true to always use the non-native picker. By default, flatpickr utilizes native datetime widgets unless certain options (disable) are used.

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