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
Currently formatWeekNumber function has following signature: formatWeekNumber: (date: Date) => number;
Before version 7.0, @types/react-datepicker package had following signature: formatWeekNumber?(date: Date): string | number;
To Reproduce
Try to pass format function which returns string to the formatWeekNumber prop. TS error is raised.
Expected behavior
Format function allows both number and string types to be returned
Additional context
As far as I can see in code, the change might be straightforward but it may break the code for the users that adjusted their onWeekSelect callback after version 7.0 came out.
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently
formatWeekNumber
function has following signature:formatWeekNumber: (date: Date) => number;
Before version 7.0,
@types/react-datepicker
package had following signature:formatWeekNumber?(date: Date): string | number;
To Reproduce
Try to pass format function which returns string to the
formatWeekNumber
prop. TS error is raised.Expected behavior
Format function allows both
number
andstring
types to be returnedAdditional context
As far as I can see in code, the change might be straightforward but it may break the code for the users that adjusted their
onWeekSelect
callback after version 7.0 came out.The text was updated successfully, but these errors were encountered: