Closed BuhayovA closed 5 months ago
The problem still hasn't been fixed :(
`import React from 'react' import { DateRange, DayPicker, DayPickerMultipleProps, DayPickerRangeProps, DayPickerSingleProps, } from 'react-day-picker'
export interface PickDateFieldProps { ... }
export interface DayPickerMultipleProps extends PickDateFieldProps { mode: 'multiple' selected?: Date[] onSelect?: (days?: Date[]) => void }
export interface DayPickerSingleProps extends PickDateFieldProps { mode: 'single' selected?: Date onSelect?: (day?: Date) => void }
export interface DayPickerRangeProps extends PickDateFieldProps { mode: 'range' selected?: DateRange onSelect?: (range?: DateRange) => void }
export type DatePickerProps = DayPickerMultipleProps | DayPickerSingleProps | DayPickerRangeProps
const TestDatePicker: React.FC
export default TestDatePicker`
This is already being discussed in https://github.com/gpbl/react-day-picker/discussions/1570#discussioncomment-3803763, please keep the discussion in the relative page. Thanks!
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:![Screenshot 2022-10-05 at 12 00 00](https://user-images.githubusercontent.com/106966230/194036711-c4b3b6fb-c0bc-4b0c-b3d9-951cf83767bf.png)
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 https://github.com/gpbl/react-day-picker/discussions/1570#discussioncomment-3803763