forked from wojtekmaj/react-date-picker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
40 lines (36 loc) · 1.18 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
/// <reference types="react" />
type Detail = "month" | "year" | "decade" | "century"
type DateCallback = (date: Date) => void
declare module "react-date-picker" {
export default function DatePicker(props: DatePickerProps): JSX.Element;
export interface DatePickerProps {
calendarClassName?: string | string[];
calendarType?: "US" | "ISO 8601";
className?: string | string[];
isOpen?: boolean;
locale?: string;
maxDate?: Date;
maxDetail?: Detail;
minDate?: Date;
minDetail?: Detail;
next2Label?: string | React.ReactElement<any>;
nextLabel?: string | React.ReactElement<any>;
onChange?: DateCallback;
onClickDay?: DateCallback;
onClickDecade?: DateCallback;
onClickMonth?: DateCallback;
onClickYear?: DateCallback;
prev2Label?: string | React.ReactElement<any>;
prevLabel?: string | React.ReactElement<any>;
renderChildren?: (props: DatePickerRenderChildrenProps) => JSX.Element | null;
returnValue?: "start" | "end";
showNeighboringMonth?: boolean;
showWeekNumbers?: boolean;
value?: Date;
view?: Detail;
}
export interface DatePickerRenderChildrenProps {
date: Date;
view: Detail;
}
}