We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dates with 3-digit years would be invalidated
Date values like "27/12/202" will be invalidated. This happens in the default parser (@lion/ui/components/localize/src/date/parseDate.js).
parseDate.js line 72: const parsedDate = new Date(new Date(correctedYear, month - 1, day));
const parsedDate = new Date(new Date(correctedYear, month - 1, day));
Passing a dateString, "27/12/202", to the parser will return a new Date (27-12-0202).
This might also be a bug because, by looking at the code of the default parser, it seems that the intent was to only accept dates from 1950 onwards.
Date values like "27/12/202" are accepted and a new Date (27-12-0202) is returned by the default parser.
Using @lion/ui: 0.7.8
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected Behavior
Dates with 3-digit years would be invalidated
Date values like "27/12/202" will be invalidated. This happens in the default parser (@lion/ui/components/localize/src/date/parseDate.js).
parseDate.js line 72:
const parsedDate = new Date(new Date(correctedYear, month - 1, day));
Passing a dateString, "27/12/202", to the parser will return a new Date (27-12-0202).
This might also be a bug because, by looking at the code of the default parser, it seems that the intent was to only accept dates from 1950 onwards.
Actual Behavior
Date values like "27/12/202" are accepted and a new Date (27-12-0202) is returned by the default parser.
Additional context
Using @lion/ui: 0.7.8
The text was updated successfully, but these errors were encountered: