forked from gusparis/react-native-month-year-picker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
62 lines (59 loc) · 1.62 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
import {FunctionComponent} from 'react';
export type EventTypes = 'dateSetAction'|'dismissedAction'|'neutralAction';
export interface MonthPickerProps {
/**
* Date change handler.
* This is called when the user changes the date in the UI.
* It receives the event and the date as parameters.
*/
onChange?: (event:EventTypes, newDate:Date) => void;
/**
* Defines the date value used in the component.
*/
value:Date;
/**
* Defines the month list locale.
* If not sent, it defaults to device's language.
*/
locale?:string;
/**
* Defines the month list display mode.
* It could be either full, short, number or shortNumber.
* Default full.
*/
mode?:'full'|'short'|'number'|'shortNumber';
/**
* Enables phone's UI Mode color recognition; for Android 10+ and iOS 13+.
* Lower OS versions will always be Light Mode.
* Default true.
*/
autoTheme?:boolean;
/**
* Defines the maximum date that can be selected.
* Use year and month constructor.
*/
maximumDate?:Date;
/**
* Defines the minimum date that can be selected.
* Use year and month constructor.
*/
minimumDate?:Date;
/**
* Picker modal confirmation button text.
* Default Done.
*/
okButton?:string;
/**
* Picker modal cancelation button text.
* Default Cancel.
*/
cancelButton?:string;
/**
* Picker modal neutral button text.
* If not sent, button won't appear.
* Default null.
*/
neutralButton?:string;
}
declare const MonthPicker: FunctionComponent<MonthPickerProps>;
export default MonthPicker;