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

When changing only the time of a TimePicker using the keyboard, the date also changes to today's date. Version 5.0.0-alpha #26799

Closed
2 tasks done
tran-simon opened this issue Jun 16, 2021 · 2 comments
Labels
bug 🐛 Something doesn't work component: time picker This is the name of the generic UI component, not the React module!

Comments

@tran-simon
Copy link

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

With the TimePicker default value at "2021-06-10T12:00:00", changing the time using the keyboard to 12:30 also changes the date to today's date. Using the picker popup doesn't change the date

Expected Behavior 🤔

The behavior should be the same whether the users uses the keyboard or the popup picker

Steps to Reproduce 🕹

https://codesandbox.io/s/keyboardtimepicker-bug-material-ui-next-mbmy6

Steps:

  1. Have a TimePicker with the initial date value not in today's date
  2. Change the time using the keyboard
  3. The date changes
Tech Version
@material-ui/core v5.0.0-alpha.37
@material-ui/lab v.5.0.0-alpha.37
React v.17.0.2
@tran-simon tran-simon added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 16, 2021
@tran-simon tran-simon changed the title When changing only the time of a TimePicker using the keyboard, the date also changes to today's date. When changing only the time of a TimePicker using the keyboard, the date also changes to today's date. Version 5.0.0-alpha Jun 16, 2021
@eps1lon
Copy link
Member

eps1lon commented Jul 13, 2021

Thanks for the report.

Seems like this has been fixed in the meantime: https://codesandbox.io/s/keyboardtimepicker-bug-material-ui-next-forked-mytp9

@eps1lon eps1lon closed this as completed Jul 13, 2021
@eps1lon eps1lon added bug 🐛 Something doesn't work component: time picker This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 13, 2021
@tran-simon
Copy link
Author

@eps1lon It doesn't seem fixed? In your sandbox, the date at the start is 2021-06-10. Change the time to 10:00pm, and it changes the date to today's date.

It is not the same behavior when using the picker popup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: time picker This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

2 participants