UNPKG

@progress/kendo-react-dateinputs

Version:
66 lines (65 loc) 1.93 kB
import * as React from 'react'; import { Calendar } from '../calendar/components/Calendar'; import { TimePart } from '../timepicker/TimePart'; /** * @hidden */ export interface DateTimeSelectorChangeEvent<T = DateTimeSelector> { nativeEvent?: any; syntheticEvent: React.SyntheticEvent<any>; value: Date | null; target: T; cancelButton?: boolean; } /** * @hidden */ export interface DateTimeSelectorProps<T = DateTimeSelector> { value: Date | null; onChange: (event: DateTimeSelectorChangeEvent<T>) => void; disabled?: boolean; cancelButton?: boolean; min: Date; max: Date; weekNumber?: boolean; focusedDate?: Date; format?: string; } /** * @hidden */ export interface DateTimeSelectorState { tab: 'date' | 'time'; dateValue: Date | null; timeValue: Date; } /** * @hidden */ export declare class DateTimeSelector extends React.Component<DateTimeSelectorProps, DateTimeSelectorState> { private _calendar; private _timePart; private _cancelButton; private _acceptButton; private shouldFocusPart; readonly calendar: Calendar | null; readonly timePart: TimePart | null; protected readonly hasDateValue: boolean; constructor(props: DateTimeSelectorProps); componentDidUpdate(): void; render(): JSX.Element; focus: () => void; protected normalizeRange(candidate: Date, value: Date | null): Date | null; protected hasActiveButton(): boolean; protected mergeTime(current: Date | null, candidate: Date | null): Date | null; protected mergeDate(candidate: Date | null, value: Date): Date | null; protected move: (direction: "left" | "right") => void; private handleReject; private handleAccept; private handleNowClick; private handleCalendarValueChange; private handleTimeListContainerChange; private handleDateClick; private handleTimeClick; private handleKeyDown; }