Skip to content

[pickers] Fix onAccept not being called after external value change#22131

Open
michelengelen wants to merge 1 commit intomui:masterfrom
michelengelen:bugfix/21962
Open

[pickers] Fix onAccept not being called after external value change#22131
michelengelen wants to merge 1 commit intomui:masterfrom
michelengelen:bugfix/21962

Conversation

@michelengelen
Copy link
Copy Markdown
Member

This PR fixes a bug where the onAccept callback (and consequently the Clear action in the picker's action bar) would fail to fire if the picker's value had been updated externally (e.g., via a controlled value prop from Redux or parent state) since the last time the picker was opened or a value was committed.

Fixes #21962

@michelengelen michelengelen self-assigned this Apr 21, 2026
@michelengelen michelengelen added type: bug It doesn't behave as expected. scope: pickers Changes related to the date/time pickers. labels Apr 21, 2026
@code-infra-dashboard
Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 🔺+63B(+0.03%) 🔺+12B(+0.02%)
@mui/x-date-pickers-pro 🔺+63B(+0.02%) 🔺+12B(+0.02%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Deploy preview

https://deploy-preview-22131--material-ui-x.netlify.app/


Check out the code infra dashboard for more information about this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: pickers Changes related to the date/time pickers. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pickers] onAccept not called when clearing a value that was set externally via controlled prop

1 participant