Unable to handle an invalid date onBlur using formik with a yup validation schema
Current Behavior
Setup a basic formik form with a single date field that is validated with a yup schema.
Yup is able to catch the invalid date with .typeError('some messge') only when submitting
formik spews out conversion warnings
Example of blur behavior not throwing an error on the invalid date (ignore the red input, that is the internals of the input successfully flagging the invalid date)
The invalid date is caught successfully when submitting
Expected behavior
That formik's blur catches the typeError correctly and adds that to the errors property
Reproducible example
Unable to reproduce in a codesandbox working with a complicated application that has a custom date input that allows the user to enter inputs like 99/99/2023
Formik handle blur implementation should store an error not log a console warning about the invalid data for the data type in the same way it would if a form field of type number was given a string, I also cannot override this process with setFieldError() method
Additional context
unable to use setFieldError('fooDate', 'not a valid date') has no effect, no idea what's happening there.
Bug report
Unable to handle an invalid date onBlur using formik with a yup validation schema
Current Behavior
Setup a basic formik form with a single date field that is validated with a yup schema.
.typeError('some messge')
only when submittingExample of blur behavior not throwing an error on the invalid date (ignore the red input, that is the internals of the input successfully flagging the invalid date)![image](https://github.com/jaredpalmer/formik/assets/26018905/8aac80dd-ccd3-4eff-9e57-5dabdfcdbf7a)
The invalid date is caught successfully when submitting![image](https://github.com/jaredpalmer/formik/assets/26018905/7d753130-b5b3-411f-92d5-142e17a9efb5)
Expected behavior
That formik's blur catches the typeError correctly and adds that to the errors property
Reproducible example
Unable to reproduce in a codesandbox working with a complicated application that has a custom date input that allows the user to enter inputs like 99/99/2023
Suggested solution(s)
Formik handle blur implementation should store an error not log a console warning about the invalid data for the data type in the same way it would if a form field of type number was given a string, I also cannot override this process with
setFieldError()
methodAdditional context
Your environment