react-next-dates
Version:
Simple and Customizable DatePicker, DateRangePicker and TimePicker for React.
42 lines (41 loc) • 1.58 kB
TypeScript
import { FC, ReactNode } from 'react';
import { ClockPrecision, DatePickerInputProps, Modifiers, ModifiersClassNames, NullableDateChangeHandler } from '../../index';
export interface DateTimeRangePickerChildrenProps {
startDateInputProps: DatePickerInputProps;
startTimeInputProps: DatePickerInputProps;
endDateInputProps: DatePickerInputProps;
endTimeInputProps: DatePickerInputProps;
openStartDatePicker: () => void;
openStartTimePicker: () => void;
openEndDatePicker: () => void;
openEndTimePicker: () => void;
}
export declare type DateTimeRangePickerChildren = (props: DateTimeRangePickerChildrenProps) => ReactNode;
export interface DateTimeRangePickerProps {
locale: Locale;
dateFormat?: string;
timeFormat?: string;
startDate?: Date | null;
endDate?: Date | null;
minDate?: Date;
maxDate?: Date;
minLength?: number;
maxLength?: number;
modifiers?: Modifiers;
modifiersClassNames?: ModifiersClassNames;
startDatePlaceholder?: string;
startTimePlaceholder?: string;
endDatePlaceholder?: string;
endTimePlaceholder?: string;
timePrecision?: ClockPrecision;
vibrate?: boolean;
className?: string;
portalContainer?: Element;
readonlyOnTouch?: boolean;
autoOpen?: boolean;
onStartDateChange?: NullableDateChangeHandler;
onEndDateChange?: NullableDateChangeHandler;
children: DateTimeRangePickerChildren;
}
declare const DateTimeRangePicker: FC<DateTimeRangePickerProps>;
export default DateTimeRangePicker;