react-day-picker
Version:
Customizable Date Picker for React
17 lines (16 loc) • 783 B
TypeScript
import { DayPickerProps } from '../DayPicker';
import { DayPickerContextValue } from '../contexts/DayPicker';
import { DayPickerBase } from './DayPickerBase';
import { SelectSingleEventHandler } from './EventHandlers';
/** The props for the [[DayPicker]] component when using `mode="single"`. */
export interface DayPickerSingleProps extends DayPickerBase {
mode: 'single';
/** The selected day. */
selected?: Date | undefined;
/** Event fired when a day is selected. */
onSelect?: SelectSingleEventHandler;
/** Make the selection required. */
required?: boolean;
}
/** Returns true when the props are of type [[DayPickerSingle]]. */
export declare function isDayPickerSingle(props: DayPickerProps | DayPickerContextValue): props is DayPickerSingleProps;