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

273
Views
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 answers
Answer question

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 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!