For me it’s just a bad one pattern. Of course a year can have 5 or 6 digit values for some scenarios (not exactly within the pattern (standard) universal), but no one works with this, the default browser should be the one that most people use and at the moment it is 4 digits (it was already 2 and could be back) and the standard ISO 8601 clearly says it should be 4 (giving the freedom to be more, which to me is a bad freedom because it doesn’t have a fixed pattern, but it adopts a number that makes more sense).
But note that limiting the minimum and maximum that can be entered nothing changes in Firefox, even if you boot with a value off. Of course, at the end of the typing it will be considered invalid, but works with 6 digits. Try it:
<input type="date" value="111111-08-09" min="2019-01-01" max="2019-12-31">
I put in the Github for future reference.
Solution to this at the FF? There may be something simple (I don’t think so, it’s full of wrong answers out there), but I think the current solution is to make your own work right.
In fact was considered a bug in Chrome And so they changed, but they thought they couldn’t change more radically because specification doesn’t tell you to do this, and if you do it and one day specification tells you to do something else, they have something incompatible. Let’s wait for the FF to fix it (wants to open one Issue?). I don’t know about Safari.
And the specification may not change because it can create an incompatibility in some browser that has done something else, creating a deadlock :). Web is one of the worst computer inventions for precisely these things, the idea is good, the implementation is terrible. They’re worried about accessibility when even the basics don’t work right.
It only passes in my mind temporal scalabillity.
– Vinicius De Jesus
Particularly, I find the input type "date" mt bad. I would use 3 separate fields type "number", one for each information: day, month and year. Or a select for each.
– Sam
depends on the application you are developing. in the vast majority of cases it does not make sense to have more than 4 digits, but it goes that someone develops a platform/game that has as theme the years to come. far-fetched but I don’t know
– BRABO