You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A number of props are inferred as any after updating react-datepicker to v7. This makes it impossible to extend the DatePicker component's props for a component that renders a DatePicker.
To Reproduce
Install react-datepicker v7 (7.3.0 at the moment of writing) and let TypeScript infer types for props that are not directly configured in the DatePickerProps interface.
importReactfrom'react';importDatePicker,{DatePickerProps}from'react-datepicker';// These get inferred as `any`typeA=React.ComponentProps<typeofDatePicker>['minDate'];typeB=DatePickerProps['maxDate'];typeC=DatePickerProps['dateFormatCalendar'];// These worktypeD=DatePickerProps['open'];
Expected behavior
The type is correctly inferred.
Screenshots
Additional context
TypeScript 5.5.4
The text was updated successfully, but these errors were encountered:
Describe the bug
A number of props are inferred as
any
after updatingreact-datepicker
to v7. This makes it impossible to extend theDatePicker
component's props for a component that renders aDatePicker
.To Reproduce
Install react-datepicker v7 (7.3.0 at the moment of writing) and let TypeScript infer types for props that are not directly configured in the
DatePickerProps
interface.Expected behavior
The type is correctly inferred.
Screenshots
Additional context
TypeScript 5.5.4
The text was updated successfully, but these errors were encountered: