final-form / final-form/react-final-form
Material-Ui DatePicker Keyboard Option handles partial input unexpectedly
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### Are you submitting a **bug report** or a **feature request**?
Bug Report
### Steps to reproduce the bug?
To reproduce this bug open the material-ui demo and add the variable keyboard to DatePicker in the DatePickerWrapper. It should look like this:
```
```
On the display side now scroll down to date picker section and type in July 10, and hit tab. This updates the value. Then go back in and remove part of the date to Jul, hit tab again. This does not update the value, so the value in the form is now invisibly stale and incorrect! It also leaves the partial date there without throwing an error.
### What is the expected behavior?
Expected behavior is for this to throw an error, and to change the form value.
### Sandbox Link
https://codesandbox.io/s/9ywq085k9w
### Other information
I have a feeling it has something to do with the onInputChange.
Contributor guide
Assessment
This issue has not been assessed yet.