cvisionai / tator

Video analytics web platform
https://tator.io
GNU Affero General Public License v3.0
98 stars 32 forks source link

Datetime input accepts more than 4 digits for year #1678

Open marktaipan-cvisionai opened 1 month ago

marktaipan-cvisionai commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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.