Closed ignatiusreza closed 2 months ago
@ignatiusreza Thank you for opening this issue.
The behavior indeed looks strange.
The different behavior of the readOnly
flag, which is set on Mobile Pickers, causes this issue.
We'll look into this issue. 👍
:warning: This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.
@ignatiusreza: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.
Steps to reproduce
Link to live example: https://codesandbox.io/s/sad-firefly-c5ptqr?file=/src/Demo.js
Steps:
Current behavior
Date picker input "value" is set to "format".
Expected behavior
Date picker input "value" should be "null" (blank)
Alternatively, for
MobileDatePicker
(andMobileDateTimePicker
), it might not be necessary for placeholder to be assigned as value when the input is focused. Since the expectation is for the user to pick the date (& time) via the date picker dialog.Context
We customized the default date picker actionbar, to enable user to "Clear" current value of the datepicker.
Your environment
Reproducible in code sandbox, browser: Chrome.npx @mui/envinfo
Search keywords: datepicker format placeholder