New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FieldError] - unexpected type error for Date property which is not nullable #8749
Comments
thanks for the issure report, type |
Thanks for the response. I honestly cannot completely follow your explanation as I didn't use interface InputDateProps<T> {
className?: string
type: 'date' | 'time'
register: UseFormRegister<T>
isDirty?: boolean
defaultValue?: string
label: string
name: Path<T>
required?: boolean
error?: Merge<FieldError, FieldErrorsImpl<DeepRequired<Date>>> | FieldError
} |
It's not that you are using |
Version Number
7.33.1
Codesandbox/Expo snack
https://codesandbox.io/s/recursing-jang-9l8kqm?file=/src/App.tsx
Steps to reproduce
App.tsx
and check the type error for themandatoryDateError
Expected behaviour
After upgrading to version 7.33.1 I got TS-errors because my
DateInput
expect aFieldError
regardless if the Date is nullable or not. This is not an urgent issue but I thought it might be a edge case which has been discovered. Or perhaps I just don't understand why this behaviour makes sense.Thanks for your work and the awesome library!
What browsers are you seeing the problem on?
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: