After doing the upgrade to have x-date-pickers in my project, the minDate={DATE} and maxDate={DATE} error saying :
<code>Type 'Date | undefined' is not assignable to type 'undefined'.
Type 'Date' is not assignable to type 'undefined'.ts(2322)
validation.d.ts(62, 5): The expected type comes from property 'maxDate' which is declared here on type 'IntrinsicAttributes & DatePickerProps<never, false> & RefAttributes<HTMLDivElement>'
(property) BaseDateValidationProps<never>.maxDate?: undefined
Maximal selectable date.
@default
2099-12-31
</code>
<code>Type 'Date | undefined' is not assignable to type 'undefined'.
Type 'Date' is not assignable to type 'undefined'.ts(2322)
validation.d.ts(62, 5): The expected type comes from property 'maxDate' which is declared here on type 'IntrinsicAttributes & DatePickerProps<never, false> & RefAttributes<HTMLDivElement>'
(property) BaseDateValidationProps<never>.maxDate?: undefined
Maximal selectable date.
@default
2099-12-31
</code>
Type 'Date | undefined' is not assignable to type 'undefined'.
Type 'Date' is not assignable to type 'undefined'.ts(2322)
validation.d.ts(62, 5): The expected type comes from property 'maxDate' which is declared here on type 'IntrinsicAttributes & DatePickerProps<never, false> & RefAttributes<HTMLDivElement>'
(property) BaseDateValidationProps<never>.maxDate?: undefined
Maximal selectable date.
@default
2099-12-31
I’ve uninstalled and reinstalled the package, it’s still weirdly saying it only accepts undefined instead of a Date like shown in the docs. What could be going wrong here?
Thanks !
New contributor
xdriver is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.