2

I am trying to understand the level of support of <input type="date"> in iOS. I tested it with an iPhone 4 with iOS 7.0.3, even if I specify a min attribute the date picker lets me choose a date before the constraint.

The HTML code is this:

<input type="date" id="checkIn" name="checkIn" class="form-control input-sm" value="2014-05-26" min="2014-05-26" data-date-format="YYYY-MM-DD" data-date-minDate="2014-05-26" placeholder="yyyy-mm-dd">

The data attributes are set for this datepicker but I detect the field support via Modernizr so I'm really sure it does not interfere in any case with the datepicker.

So the question is: did I do something wrong or is the date field lacking constraints support?

1 Answer 1

5

I have been having the same issue. It looks like although using <input type="date"> does render a date field. The min attribute is not working. This website clearly states that there is support lacking.

From the website, Partial support in iOS refers to a lack of support for attributes like step, min, or max. You have not done anything wrong.

Hope this answers your question.

1
  • Seems like they ignore support of attributes so far! And don't support type date on desktop safari at all. Indeed, safari is new ie. Oct 18, 2018 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.