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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pickers] Return the previous value if the user click's out the MobileDatePicker Dialog #7700

Open
2 tasks done
sohaibnajjar opened this issue Jan 25, 2023 · 1 comment 路 May be fixed by #7721
Open
2 tasks done

[pickers] Return the previous value if the user click's out the MobileDatePicker Dialog #7700

sohaibnajjar opened this issue Jan 25, 2023 · 1 comment 路 May be fixed by #7721
Assignees
Labels
component: pickers This is the name of the generic UI component, not the React module! new feature New feature or request

Comments

@sohaibnajjar
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 馃暪

Link to live example: https://mui.com/x/react-date-pickers/date-picker/ => MobileDatePicker

  1. click on the mobile date picker => select value => close => the value will return as it was
  2. click on the mobile date picker => select value => Ok => I will see the updated value

The bug:
3. click on the mobile date picker => select value => and click outside => I will see the updated value

Current behavior 馃槸

Click on the mobile date picker => select value => and click outside => I will see the updated value

Expected behavior 馃

Click on the mobile date picker => select value => and click outside => the value will return as it was?

because I didn't accept the new value

Context 馃敠

when I click close, onChange gets called again and with the old date, so i can return the old value
we can call the onChange onClickOutSide so the old value will return again with no change

Your environment 馃寧

No response

Order ID 馃挸 (optional)

No response

@sohaibnajjar sohaibnajjar added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 25, 2023
@zannager zannager added the component: pickers This is the name of the generic UI component, not the React module! label Jan 25, 2023
@LukasTy LukasTy self-assigned this Jan 25, 2023
@LukasTy LukasTy added bug 馃悰 Something doesn't work new feature New feature or request and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer bug 馃悰 Something doesn't work labels Jan 25, 2023
@LukasTy
Copy link
Member

LukasTy commented Jan 26, 2023

Thank you for opening the issue.
This directly related to another umbrella issue we have regarding the management of value/date and when is the change propagated to the component user.

@LukasTy LukasTy linked a pull request Jan 26, 2023 that will close this issue
@flaviendelangle flaviendelangle changed the title [pickers] Return the previos value if the user click's out the MobileDatePicker Dialog [pickers] Return the previous value if the user click's out the MobileDatePicker Dialog Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants