Skip to content

[DateRangePicker] Fix to reset range position after closing mobile Picker #17631

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

Merged

Conversation

LukasTy
Copy link
Member

@LukasTy LukasTy commented Apr 30, 2025

For now, the range position is reset to start only when the Desktop range Picker is closed.
This PR fixes to do the same for Mobile Picker and adds to ensure this behavior is stable.

@LukasTy LukasTy added type: bug A bug or unintended behavior in the components. plan: Pro Impact at least one Pro user scope: pickers Changes or issues related to the pickers product component: DateRangePicker labels Apr 30, 2025
@LukasTy LukasTy self-assigned this Apr 30, 2025
)('should return back to start range position after reopening a range picker', async () => {
const pickerType = pickerParams.type as PickerRangeComponentType;
// If transitions are disabled, the `onExited` event is not triggered
config.disabled = false;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to enable Transitions for this test, otherwise the onExited callback is not triggered. 🙈

@mui-bot
Copy link

mui-bot commented Apr 30, 2025

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

Generated by 🚫 dangerJS against 4b472d4

@LukasTy LukasTy marked this pull request as ready for review April 30, 2025 11:40
Copy link
Member

@flaviendelangle flaviendelangle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change make sense to me 👌

@LukasTy LukasTy merged commit a09b872 into mui:master May 6, 2025
21 checks passed
@LukasTy LukasTy deleted the fix-mobile-range-picker-position-resetting branch May 6, 2025 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan: Pro Impact at least one Pro user scope: pickers Changes or issues related to the pickers product type: bug A bug or unintended behavior in the components.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants