-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[pickers] Keep invalid date state consistent #20040
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
Conversation
|
Deploy preview: https://deploy-preview-20040--material-ui-x.netlify.app/ Bundle size report
|
siriwatknp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a rough review, I see:
- some comments are not necessary as the code already explain the logic
- a PR description would be nice to explain how this PR fixes a lot of issues at the same time.
I will do intensive review soon.
Signed-off-by: michel <[email protected]>
Signed-off-by: michel <[email protected]>
Signed-off-by: michel <[email protected]>
Signed-off-by: michel <[email protected]>
packages/x-date-pickers/src/DateField/tests/invalidStateKeyboard.DateField.test.tsx
Outdated
Show resolved
Hide resolved
packages/x-date-pickers/src/internals/hooks/useField/useFieldState.ts
Outdated
Show resolved
Hide resolved
packages/x-date-pickers/src/internals/hooks/useField/useFieldState.ts
Outdated
Show resolved
Hide resolved
packages/x-date-pickers/src/internals/hooks/useField/useFieldV6TextField.ts
Show resolved
Hide resolved
Signed-off-by: michel <[email protected]>
Signed-off-by: michel <[email protected]>
Signed-off-by: michel <[email protected]>
packages/x-date-pickers/src/internals/hooks/useField/useFieldState.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: michel <[email protected]>
Signed-off-by: michel <[email protected]>
siriwatknp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Nicely done. Only one comment, better to wait Flavien's response before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait, it breaks this behavior. If it's invalid, I cannot change other section.
I tested the https://deploy-preview-20040--material-ui-x.netlify.app/x/react-date-pickers/date-picker/ (production works fine)
Screen.Recording.2568-11-06.at.10.58.13.mov
flaviendelangle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of it 🙏
packages/x-date-pickers/src/DateField/tests/blurPartialFilling.DateField.test.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: michel <[email protected]>
Signed-off-by: michel <[email protected]>
|
The latest commit does not fix #17967 Screen.Recording.2568-11-06.at.10.58.13.mov |
Signed-off-by: michel <[email protected]>
Signed-off-by: michel <[email protected]>
siriwatknp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This should keep the invalid state consistent during different phases of the input cycle in the pickers.
This fixes some validation bugs:
Consistent invalid field state

Invalid state "shuffling"
Before:
Screen.Recording.2025-10-30.at.14.52.48.mov
After:
Screen.Recording.2025-10-30.at.14.53.05.mov
Fixes #17967
Fixes #18039
Fixes #18299
Fixes #19777