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
Is it possible to add null to the ReactDatePickerPropsstartDate props as Typescript complaint about tying between the moment.Moment | null and moment.Moment | undefined?
I faced this issue when trying to use useState hook:
Although the issue can simply resolved by just casting to moment.Moment | undefined but I think it might be nicer to unify the typing since most of the date has the moment.Moment | null type.
Is it possible to add
null
to theReactDatePickerProps
startDate
props as Typescript complaint about tying between themoment.Moment | null
andmoment.Moment | undefined
?I faced this issue when trying to use
useState
hook:Although the issue can simply resolved by just casting to
moment.Moment | undefined
but I think it might be nicer to unify the typing since most of the date has themoment.Moment | null
type.Below are the code reference:
eui/src/components/date_picker/react-datepicker.d.ts
Lines 103 to 106 in 55252c8
eui/src/components/date_picker/react-datepicker.d.ts
Line 138 in 55252c8
eui/src/components/date_picker/react-datepicker.d.ts
Line 161 in 55252c8
The text was updated successfully, but these errors were encountered: