DatePicker and DateRangePicker don't always display value passed #10727
Labels
component: pickers
This is the name of the generic UI component, not the React module!
duplicate
This issue or pull request already exists
regression
A bug, but worse
Steps to reproduce
CodeSandbox link
Steps:
Current behavior
First time around, the selected date in the picker and in the textfield is the first day of the week. For instance, if you click on 19th October 2023, the selected day will become 15th October 2023 (which is the first day of the week according to my locale settings)
When we open picker again and select 19th October again, it won't move to 15th October but instead the 19th will be kept. However, if you choose a different week, the behaviour is as expected
Expected behavior
Whichever date you select, it should always go to the start of the week or whichever value it is set. I believe that is the expected behaviour in controlled mode
Context
I have
DatePicker
and aDateRangePicker
components where I need to move the clicked date to the start of the week. The fact the behaviour is consistent affects UI experience for users.Your environment
npx @mui/envinfo
Search keywords: date picker, pickers, datepicker controlled state
The text was updated successfully, but these errors were encountered: