[DateField] LL format allows for removing MMMM placeholder resulting in issues when filling in a date. #10399
Closed
2 tasks done
Labels
bug 🐛
Something doesn't work
component: pickers
This is the name of the generic UI component, not the React module!
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example:
Issue also exists on docs page https://mui.com/x/react-date-pickers/date-field/#customize-the-date-format in the LL format.
Steps:
Current behavior 😯
In the current behaviour (on mobile) the pre-filed MMMM value gets removed when hitting the hitting the backspace key on the keyboard when there is no value.
Expected behavior 🤔
The initial value of MMMM should stay in place when hitting the delete or backspace key when there is no other value.
Context 🔦
In our application we are using the DateField component as part of a registration form. We switched away from the browser native DatePicker as this was confusing to use and required a lot of scrolling for elderly users.
We are using the DateField in combination with the LocalizationProvider (using AdapterDayjs). We went for the LL format to stay as close to the date format our foreign users are familiar with. We opted for a full letter month as this reduces more confusion about date format.
When we were testing the DateField in our application we noticed in date formats where month is in the middle (nl, de, fr, es, etc.) removing the Month part completely results in a problem where you cannot fill it back in. This would require a page refresh the state for the rest of the form.
Your environment 🌎
npx @mui/envinfo
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: