[v4] KeyboardDatePickers returning different time on keyboard input and touch click
Paul6552 opened this issue · 1 comments
Paul6552 commented
KeyboardDatePickers is returning a different time when you do it via keyboard or with touch click.
- [x ] The issue is present in the latest release.
- [x ] I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
Hours, minutes and seconds are different if I am typing the date with the keyboard or I am doing over touch with the symbol
Expected Behavior 🤔
Keyboard input and touch input should be the same. Hours, seconds to zero
Steps to Reproduce 🕹
Steps:
- Type in a new Date with keyboard input
- See in the console for the date. Seconds, hours have a time
- Type in a new Date with the touch symbol, without keyboard, only with mouse
- See in the console for the date. Seconds hours are now zero.
Your Environment 🌎
react 17.02
material-ui v4.11.4
Paul6552 commented
Workaround:
date.setHours(2); date.setSeconds(0); date.setMilliseconds(0);