This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathindex.d.ts
78 lines (69 loc) · 1.83 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import * as React from 'react';
import * as moment from 'moment';
export type Mode = {
'day': string,
'month': string,
'year': string
};
export type Position = 'top' | 'bottom';
export type Value = string | Date | moment.Moment ; // | MomentDate
export type ValueLink = {
value? : Value,
requestChange(e: Date): void
}
export type DateOnChangeHandler = {
(jsDate: Date, dateString: string): void;
}
export interface DatePickerInputProps {
value?: Value,
valueLink?: ValueLink,
onChange?: DateOnChangeHandler,
onShow?: () => void,
onHide?: () => void,
onClear?: () => void,
small?: boolean,
defaultValue?: Value,
minDate?: Value,
maxDate?: Value,
locale?: string,
startMode?: Mode,
fixedMode?: boolean,
displayFormat?: string,
returnFormat?: string,
format?: string,
validationFormat?: string,
showOnInputClick?: boolean,
closeOnClickOutside?: boolean,
showInputButton?: boolean,
autoClose?: boolean,
floating?: boolean,
disabled?: boolean,
position?: Position,
iconClassName?: string,
iconClearClassName?: string,
className?: string, // used to omit from inputProps
style?: object, // used to omit from inputProps
placeholder?: string
}
export class DatePickerInput extends React.Component<DatePickerInputProps, {}> {}
export interface DatePickerProps {
onChange?: DateOnChangeHandler;
value?: Value,
valueLink?: ValueLink,
defaultValue?: Value,
minDate?: Value,
maxDate?: Value,
locale?: string,
startMode?: Mode,
fixedMode?: boolean,
returnFormat?: string,
floating?: boolean,
closeOnClickOutside?: boolean, // used only with DatePickerInput
className?: string,
prevIconClassName?: string,
nextIconClassName?: string,
position: Position,
style?: object,
placeholder?: string
}
export class DatePicker extends React.Component<DatePickerProps, void> {}