[pickers] Fire `onError` for partially filled date
Proposal to solve #17499
Question: should we show the field in error state for partially filled date (like in v7)? If so, then this PR is fine. Otherwise, we might want a different approach (maybe the behavior should be configurable through a prop).
Deploy preview: https://deploy-preview-17514--material-ui-x.netlify.app/
Bundle size report
Bundle size will be reported once CircleCI build #558866 finishes.
Generated by :no_entry_sign: dangerJS against 2a85ae90451030369f4071482c6eb34fbe851885
We are missing the changes on Picker level, Pro package and some tests for this.
The pro validation (date range, date time range and time range) always use date validation and time validation. I need to check the behavior on the picker, but the validation value from the field should be correctly forwarded. And we need test of course :ok_hand:
I need to check the behavior on the picker, but the validation value from the field should be correctly forwarded.
I've tested and it seemed that Picker did not trigger this error, same for the range Pickers and Fields. 🤔
I'll have a look
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Yes, please provide convenient way to detect that input is invalid (incomplete, partial). As of now, just having null instead of Invalid Date is a dangerous regression. Users can easily miss part of a placeholder still being visible and progress through form assuming that value was provided (validations will not block progress if field was not mandatory).
We will need a way to determine if current value is null (missing) or invalid, including a scenario when it was invalid and then the value was cleared. Maybe the most recent error status should also be passed as additional argument to change handler?