[pickers] manual year addition only allows when 3 digits entered #16837
Labels
bug 🐛
Something doesn't work
component: date picker
This is the name of the generic UI component, not the React module!
component: pickers
This is the name of the generic UI component, not the React module!
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
Steps to reproduce
Steps:
Current behavior
When I manually type date like this 11-11-0111 it accepts 0111 as an year. If I enter 11-11-0001 it detects this as null date.
Expected behavior
I want to ensure that I catch in the validation a date like (11-11-0001, 11-11-0011, 11-11-0111) as invalid. Right now it considers it as null and I am able to save as null. How can I catch this such that if the year entered is not up to 4 digits (e.g. four digit years like 11-11-1111 or 11-11-2024), then the date is considered invalid? How can I achieve that?
Context
No response
Your environment
npx @mui/envinfo
Search keywords: year manual date picker mui
The text was updated successfully, but these errors were encountered: