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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pickers] The DatePicker 'onAccept' event fires both when clicking on the Ok button and also when clicking outside the Picker (or pressing ESC), if the date has changed #11356

Closed
MariusBaci opened this issue Dec 8, 2023 · 2 comments
Labels
component: pickers This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists

Comments

@MariusBaci
Copy link

MariusBaci commented Dec 8, 2023

Summary 💡

It would be nice to differentiate the 2 behaviours:

  • clicking on the OK button to accept a date
  • clicking outside the Modal (or pressing ESC) to keep the selected date OR return to the previous date

Either a param on the 'onAccept' event, or a separate event would help. This way if you want to return to the previous date when clicking outside the Modal would still be possible. Otherwise you have no way of knowing which one of the 2 things happened (the user clicked on the OK button, or he clicked outside the Modal).

Thank you.

Examples 🌈

No response

Motivation 🔦

No response

Search keywords: DatePicker onAccept

@MariusBaci MariusBaci added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 8, 2023
@michelengelen michelengelen added the component: pickers This is the name of the generic UI component, not the React module! label Dec 11, 2023
@michelengelen michelengelen changed the title The DatePicker 'onAccept' event fires both when clicking on the Ok button and also when clicking outside the Picker (or pressing ESC), if the date has changed [pickers] The DatePicker 'onAccept' event fires both when clicking on the Ok button and also when clicking outside the Picker (or pressing ESC), if the date has changed Dec 11, 2023
@michelengelen
Copy link
Member

@LukasTy duplicate of #10000 ?

@LukasTy
Copy link
Member

LukasTy commented Dec 11, 2023

@michelengelen thank you for taking a look and identifying the duplicate.
Yes, as you mentioned, we already have an issue groomed to add additional context to the callbacks. 😉
Closing this issue as a duplicate.
@MariusBaci feel free to subscribe to the linked issue to be notified about its progress.

@LukasTy LukasTy closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2023
@LukasTy LukasTy added duplicate This issue or pull request already exists and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 11, 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! duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants