import { DayPickerProps } from 'react-day-picker'; export interface IDatePickerProps extends DayPickerProps { innerRef?: React.Ref; range?: boolean; } export interface IRangeDatePickerOption { id: string; label: string; isManual?: boolean; value: { from: Date; to: Date; } } interface IRangeDatePickerChildrenPayloadDatePicker { innerRef?: React.Ref; modifiers?: DayPickerProps['modifiers']; initialMonth?: Date; month: Date; range?: boolean; fromMonth?: Date; toMonth?: Date; selectedDays?: DayPickerProps['selectedDays']; disabledDays?: DayPickerProps['disabledDays']; onDayMouseEnter: DayPickerProps['onDayMouseEnter']; onDayClick(day: Date): void; onMonthChange(month: Date): void; } interface IRangeDatePickerChildrenPayloadSelect { selected: string | number; error?: string; onItemSelect(itemKey: string | number): void; } interface IRangeDatePickerChildrenPayloadInput extends React.InputHTMLAttributes { ref?: { current: HTMLElement; }; value: string; onChange(e: React.ChangeEvent): void; } export interface IRangeDatePickerChildrenPayload { select: IRangeDatePickerChildrenPayloadSelect; inputs: { fromDate: Date; toDate: Date; from: IRangeDatePickerChildrenPayloadInput; to: IRangeDatePickerChildrenPayloadInput; }; datepicker: IRangeDatePickerChildrenPayloadDatePicker; [k: string]: any; } export interface IRangeDatePickerProps { options: IRangeDatePickerOption[]; initialSelectedItemKey?: string; initialFromDate?: Date; initialToDate?: Date; toMonth?: Date; onChange(selected: IRangeDatePickerOption): void; children(payload: IRangeDatePickerChildrenPayload): React.ReactNode; } interface RangeDatePickerClass

extends React.ComponentClass

{ Select: React.ComponentType<{ children: React.ReactNode }>; DatePickers: React.ComponentType<{ children: React.ReactNode }>; } type RangeDatePickerComponentType

= RangeDatePickerClass

; interface IDatePickerRangeSelectInputsProps extends React.HTMLAttributes{ from: IRangeDatePickerChildrenPayloadInput; to: IRangeDatePickerChildrenPayloadInput; } export var DatePicker: React.ComponentType; export var RangeDatePicker: RangeDatePickerComponentType; export var DatePickerRangeSelectInputs: React.ComponentType; export var DatePickerRangeCalendarsWrapper: React.ComponentType<{ children: React.ReactNode }>;