We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! I'm not opening new issue because I think it can be somehow related with this one 馃檪
So, after updating to 8.3.1 this issue appeared:
mode and selectedDate comes from props. Their types are defined as follows:
mode
selectedDate
mode?: 'single' | 'multiple' | 'range'; selectedDate: DatesType
(and DatesType: Date | Date[] | DateRange | undefined, where DateRange is imported from `react-day-picker)
DatesType: Date | Date[] | DateRange | undefined
DateRange
At this point I ran out of ideas how to resolve this issue. The only solution that worked, was something like this:
{ mode === 'single' && <DayPicker mode='single' selected={selectedDate as Date | undefined} {...otherProps} /> } { mode === 'multiple' && <DayPicker mode='multiple' selected={selectedDate as Date[] | undefined} {...otherProps} /> } { mode === 'range' && <DayPicker mode='range' selected={selectedDate as DateRange | undefined} {...otherProps} /> }
but to be hones it doesn't look too clean.
Maybe you would know what is the issue here and if there is a better way to resolve it than the one I showed above?
Thanks in advance 馃槂
Originally posted by @bartlomiej-bykowy in #1570 (comment)
The text was updated successfully, but these errors were encountered:
fix: improved DayPickerProps using generic constraints (gpbl#1583)
bab37a6
05686e5
Successfully merging a pull request may close this issue.
So, after updating to 8.3.1 this issue appeared:
mode
andselectedDate
comes from props. Their types are defined as follows:(and
DatesType: Date | Date[] | DateRange | undefined
, whereDateRange
is imported from `react-day-picker)At this point I ran out of ideas how to resolve this issue. The only solution that worked, was something like this:
but to be hones it doesn't look too clean.
Maybe you would know what is the issue here and if there is a better way to resolve it than the one I showed above?
Thanks in advance 馃槂
Originally posted by @bartlomiej-bykowy in #1570 (comment)
The text was updated successfully, but these errors were encountered: