DatePicker: DatePicker allows to input a year e.g. "203" and then is choosable from the pop up calendar window #6873
-
Currently if the user inputs a year e.g. "203", this year is to be chosen from the DatePicker. The only way to deselect this year, is when the user types it manually in the DatePicker inputField. Is this wanted behavior? Or the years 203, 305 etc. are invalid? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I'm not sure I understand. If the year "203" is selected, it should be reflected in the picker as well. Am I missing something here? |
Beta Was this translation helpful? Give feedback.
-
Sorry, now I see how I was not clear enough. The main question here is if this behavior is expected from a business logical point of view. In what case would anybody need to select that old year and be treated as a valid user input? Of course, each project can set its own additional validation to this component for what makes sense based on its business requirements. That was just something that was caught based on manual testing and we wanted to ask why is it done like it is, is it intentional, or is it a "bug" via too loosely validated in these scenarios. |
Beta Was this translation helpful? Give feedback.
Hi @SvetoslavZ99,
I think selecting an old year is a valid use case for the DatePicker, e.g. someone could build an application for tracking historical events (just the first thing which came to my mind).
Due to this fact, I think it is valid that we do not provide some default validation and leave the decision up to the consumers of our libs to ensure the inputs are matching their business requirements.