Reputation: 11
I've tried turning
<input type="date" max="1967-12-25">
into
<input type="date" max="12-25-1967">
while the former worked, the latter didn't
Upvotes: 0
Views: 18
Reputation: 522005
The specification requires the format to be YYYY-MM-DD
. Otherwise it would be the same problem that all date-as-string representations have: what is the format? **-**-YYYY
equally permits the interpretation as DD-MM-YYYY
and MM-DD-YYYY
, and any other order has the same problem. You have to stick to some standard, and that is defined as YYYY-MM-DD
, period.
Upvotes: 1