| Tech | Version |
|---------------------|---------|
| material-ui-pickers | 2.2.1 |
| material-ui | 3.9.2 |
| React | 16.8.1 |
| Browser | Chrome 71 |
| Peer library | date-fns(date-io): 1.1.0 |
| Formik | 1.5.0 |
| Yup | 0.26.10 |
startDate: Yup.date().required(),
endDate: Yup.date().when('startDate', (startDate, schema) => (startDate ? schema.min(startDate) : schema.date())),
The picker does not block schema validation.
Schema validation is no more working for any field on the schema.
We know that - in v3 (#862) we will definitely recreate for integration process. Possibly duplicate of #836.
@dmtrKovalenko are you able to please provide an example of how to do this properly now?
I'm also trying to figure out how to use yup with the date-picker.
I'm also trying to figure out how to use yup with the date-picker.
I also want to set the validation if the endDate is less than StartDate. I am using KeyboardDatePicker from material-ui pickers.
I am having this issue as well. The "Invalid Date" error shows up, but when I clear the value, the "Required" error never shows up.
Most helpful comment
I also want to set the validation if the endDate is less than StartDate. I am using KeyboardDatePicker from material-ui pickers.