UNPKG

843 BTypeScriptView Raw
1/// <reference types="react" />
2/// <reference types="styled-jsx" />
3import { MaterialUiPickersDate } from '../../typings/date';
4import { BasePickerProps } from '../../typings/BasePicker';
5export interface StateHookOptions {
6 getDefaultFormat: () => string;
7}
8export declare function usePickerState(props: BasePickerProps, options: StateHookOptions): {
9 pickerProps: {
10 date: MaterialUiPickersDate;
11 onChange: (newDate: MaterialUiPickersDate, isFinish?: boolean) => void;
12 };
13 inputProps: {
14 inputValue: string;
15 validationError: import("react").ReactNode;
16 openPicker: () => false | void;
17 };
18 wrapperProps: {
19 format: string;
20 open: boolean;
21 onClear: () => void;
22 onAccept: () => void;
23 onSetToday: () => void;
24 onDismiss: () => void;
25 };
26};