-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
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
🐛 fix(Date): update date range / break of year #1358
Labels
🐛 bug
Something isn't working
Comments
/cib |
Branch fix/issue-1358 created! |
@Feamusbal this change can only be done globally and not per use case |
public static setTwoDigitCutoffYear(cutoff = 10) {
Settings.twoDigitCutoffYear = ((new Date()).getFullYear() % 100) + cutoff
} I can do this so today plus 10 years in the future is possible for 2000 rest will be 1900. So the cutoff year will be now 2034 and 35 will be 1935. |
@hirsch88 will it be easy to update it over time? So that next year (2025) it will be 35->2035 and 36-> 1936? |
hirsch88
added a commit
that referenced
this issue
Mar 26, 2024
* Create PR for #1358 * fix(date): adjust cutoff year * fix input date test --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Gery Hirschfeld <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current Behavior
If only entering two digits for the year (e.g., 12.12.60) the Date component auto completes the first two digits for the year. The break of year changes to 20XX until the 60s (e.g. 12.12.60 becomes-> 12.12.2060). This does not match the users expected mental model as they are more likely to enter 1960 than 2060)
Expected Behavior
For numbers between 35->99 we should use 19XX format. The lower number should update every year (next year 36-99).
For numbers between 00->34 we should use 20XX format. The high number should update every year (next year 00-35).
Break of Year should be added as a properity to the component.
Steps to Reproduce
see above
Version
v15
Browsers
No response
Device
No response
Code Reproduction URL
No response
Additional Information
I entered it as a bug as it isn't a feature
Code of Conduct
The text was updated successfully, but these errors were encountered: