@progress/kendo-react-dateinputs
Version:
KendoReact Date Inputs package
112 lines (111 loc) • 2.98 kB
TypeScript
import * as React from 'react';
import * as PropTypes from 'prop-types';
import { DateFormatPart, IntlService } from '@progress/kendo-react-intl';
import { TimePickerIncrementalSteps } from './models/IncrementalSteps';
/**
* @hidden
*/
export declare enum Direction {
Left = 0,
Right = 1
}
/**
* @hidden
*/
export interface TimePartChangeEvent {
nativeEvent: any;
syntheticEvent: React.SyntheticEvent<any>;
value: Date;
target: TimePart;
}
/**
* @hidden
*/
export interface TimePartProps {
disabled?: boolean;
format?: string;
max?: Date;
min?: Date;
nowButton?: boolean;
onChange?: any;
steps?: TimePickerIncrementalSteps;
smoothScroll?: boolean;
tabIndex?: number;
value?: Date | null;
boundRange?: boolean;
onNowClick?: any;
className?: string;
}
/**
* @hidden
*/
export interface TimePartState {
activeListIndex: number;
}
/**
* @hidden
*/
export declare class TimePart extends React.Component<TimePartProps, TimePartState> {
static propTypes: {
cancelButton: PropTypes.Requireable<any>;
disabled: PropTypes.Requireable<any>;
format: PropTypes.Requireable<any>;
max: PropTypes.Requireable<any>;
min: PropTypes.Requireable<any>;
nowButton: PropTypes.Requireable<any>;
steps: PropTypes.Requireable<any>;
smoothScroll: PropTypes.Requireable<any>;
tabIndex: PropTypes.Requireable<any>;
value: PropTypes.Requireable<any>;
};
static defaultProps: {
value: any;
disabled: boolean;
nowButton: boolean;
cancelButton: boolean;
format: string;
min: Date;
max: Date;
steps: {};
boundRange: boolean;
};
readonly state: TimePartState;
private _element;
private _nowButton;
private dateFormatParts;
private timeLists;
private snapTime;
private nextTickId;
constructor(props: TimePartProps);
/**
* @hidden
*/
readonly element: HTMLSpanElement | null;
protected readonly intl: IntlService;
private readonly value;
private readonly min;
private readonly max;
private readonly steps;
protected readonly boundRange: boolean;
/**
* @hidden
*/
componentWillUnmount(): void;
/**
* @hidden
*/
render(): JSX.Element;
focus: () => void;
protected timeFormatReducer: (acc: string, current: DateFormatPart) => string;
protected timeFormatFilter: (part: DateFormatPart, index: number, all: DateFormatPart[]) => boolean;
protected nextTick(f: () => any): void;
protected hasActiveButton(): boolean;
protected focusList: (dir: Direction) => void;
protected listReducer: (state: any, list: any, idx: any, all: any) => any;
protected showNowButton: () => boolean;
protected hasSteps(): boolean;
private handleKeyDown;
private handleListBlur;
private handleListFocus;
private handleChange;
}