Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DatePicker] Fix Input not clear for invalid date #29071

Conversation

MOHAMMADArsalan
Copy link

Closes: mui/mui-x#4870

In useMaskedInput hook when there is invalid date so current value is set to empty "" string. then it check is valid changed or not. that's why value is not set to clear after invalid date.

I added another check for rawValue and check if rawValue change or not. If yes then set new value.

@mui-pr-bot
Copy link

mui-pr-bot commented Oct 15, 2021

Details of bundle changes

Generated by 🚫 dangerJS against 72de2ac

@eps1lon eps1lon self-requested a review October 18, 2021 10:23
@MOHAMMADArsalan
Copy link
Author

@eps1lon Please let me if any changes are required in PR.

@mbrookes mbrookes added component: date picker This is the name of the generic UI component, not the React module! bug 🐛 Something doesn't work labels Nov 12, 2021
@flaviendelangle
Copy link
Member

Thank you for your contribution.
I am going to start a rework of the Date Picker soon and move it to https://github.com/mui-org/material-ui-x.
I am closing this PR, but I note the use case and will make sure that the new Date Picker supports it 👍

@sheuertz
Copy link

sheuertz commented Feb 8, 2022

Hi,

Can this PR be kept to fix the bug until the rework is complete? It solves an issue that is currently happening.

Thanks.

@flaviendelangle
Copy link
Member

@mnajdova if you want to merge it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: date picker This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pickers] Impossible to clear an invalid date
5 participants