react-day-picker
Version:
Customizable Date Picker for React
20 lines (19 loc) • 937 B
TypeScript
import { DayPickerProps } from '../DayPicker';
import { DayPickerContextValue } from '../contexts/DayPicker';
import { DayPickerBase } from './DayPickerBase';
import { SelectRangeEventHandler } from './EventHandlers';
import { DateRange } from './Matchers';
/** The props for the [[DayPicker]] component when using `mode="range"`. */
export interface DayPickerRangeProps extends DayPickerBase {
mode: 'range';
/** The selected range of days. */
selected?: DateRange;
/** Event fired when a range (or a part of the range) is selected. */
onSelect?: SelectRangeEventHandler;
/** The minimum amount of days that can be selected. */
min?: number;
/** The maximum amount of days that can be selected. */
max?: number;
}
/** Returns true when the props are of type [[DayPickerRange]]. */
export declare function isDayPickerRange(props: DayPickerProps | DayPickerContextValue): props is DayPickerRangeProps;