Changing StaticTimePicker input field will change the date to current date
ruixuel opened this issue ยท 1 comments
ruixuel commented
- 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 ๐ฏ
There are DatePicker and StaticTimePicker which uses same selectedDate value.
When changing the input box in StaticTimePicker, it will automatically change the date to current date.
Expected Behavior ๐ค
Changing the input box of StaticTimePicker should not change the date.
Steps to Reproduce ๐น
Sandbox link:
https://codesandbox.io/s/material-demo-forked-edquv?file=/demo.js
Steps:
- Click the pencil icon in the Static time picker to change to input box editor view
- Change the time in the input box of time picker
- The date in the Date picker changes to the current date
Context ๐ฆ
We implement a DateTimeRangePicker with DateRangePicker and two StaticTimePicker.
The user can set the start date/time and end date/time. With this bug, when the user sets the time in the input box it will change the date they already set.
Your Environment ๐
Tech | Version |
---|---|
@material-ui/core | v4.11.0 |
@material-ui/pickers | v4.0.0-alpha.12 |
React | 16.14.0 |
TypeScript | 3.8.3 |
Xekin97 commented
Same as 'inline' variant, changing year but no pick date will still trigger onChange event.