Skip to content
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

Datetime input accepts more than 4 digits for year #1678

Open
marktaipan-cvisionai opened this issue May 10, 2024 · 2 comments
Open

Datetime input accepts more than 4 digits for year #1678

marktaipan-cvisionai opened this issue May 10, 2024 · 2 comments

Comments

@marktaipan-cvisionai
Copy link
Member

Category
Bugfix

Problem
The year field in the datetime-input.js component accepts a 6 digit year. This makes it easy to accidentally put in an incorrect date.

Request
Only accept 4 digits for the year. Perhaps indicate which field is erroneous.

@bctcvai
Copy link
Member

bctcvai commented May 11, 2024

Is it worth looking at a good calendar widget (like your choices.js find) that supports both manual entry and selecting a date off a calendar?

@marktaipan-cvisionai
Copy link
Member Author

I think the existing one is fine - it supports manual entry via isoformat strings, manual entry by typing in the particular fields (where this issue was brought up), or by using the calendar selector. The issue comes from the manual entry into the defined fields and we need to try limit or at least validate it so the user can see an error occurred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants