Skip to content

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: DatePicker The React component. type: bug It doesn't behave as expected. 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

component: DatePicker The React component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pickers] Impossible to clear an invalid date

5 participants