You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Currently, (mainly because of the REGEXPs used for parsing dates, e.g. here and there), date-family inputs do not support years with more than 4 digits (they consider the value invalid and the parser returns undefined).
According to the W3 spec, the value of a date-family input should be a "valid full-date as defined in [RFC 3339], with the additional qualification that the year component is four or more digits representing a number greater than 0" (emphasis mine).
Additionally, ISO 8601 allows (upon agreement of the involved parties) to have expanded representation of years (with more than 4 digits); see for example sections 2.3.8 and 4.1.2.4.
Current browser support:
Chrome, Opera: Support date inputs and years greater than 9999.
Firefox, IE: Do not support date inputs, but the user can still enter the dates in ISO format and ngModel parses them correctly
Edge: Supports date inputs, but not years greater than 9999.
Safari: ???
There's nothing we can do for MS Edge on the Angular side, but the users of other browsers will still benefit from adding support for years greater than 9999.
The text was updated successfully, but these errors were encountered:
gkalpak
added this to the
1.5.x - migration-facilitation milestone
Jan 11, 2016
gkalpak
changed the title
feat(input[date]): support years with more than 4 digits
fix(input[date]): support years with more than 4 digits
Jan 11, 2016
Previously, the date-related regular expressions only matched years with no more than 4 digits.
This commit adds support for years with more than 4 digits. It also resolves an ambiguity in
`ISO_DATE_REGEXP` by matching the whole string (when it previosuly allowed extra characters around
the date string).
Fixes#13735Closes#13905
Currently, (mainly because of the REGEXPs used for parsing dates, e.g. here and there), date-family inputs do not support years with more than 4 digits (they consider the value invalid and the parser returns
undefined
).According to the W3 spec, the value of a date-family input should be a "valid full-date as defined in [RFC 3339], with the additional qualification that the year component is four or more digits representing a number greater than 0" (emphasis mine).
Additionally, ISO 8601 allows (upon agreement of the involved parties) to have expanded representation of years (with more than 4 digits); see for example sections 2.3.8 and 4.1.2.4.
Current browser support:
ngModel
parses them correctlyThere's nothing we can do for MS Edge on the Angular side, but the users of other browsers will still benefit from adding support for years greater than 9999.
The text was updated successfully, but these errors were encountered: