forked from CarrionB/react-native-modern-datepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
46 lines (42 loc) · 1.64 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
// Type definitions for react-native-modern-datepicker 1.0
// Project: https://github.com/HosseinShabani/react-native-modern-datepicker#readme
// Definitions by: Ankan002 <https://github.com/Ankan002>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { CSSProperties } from 'react';
export interface ModernDatepickerProps {
onSelectedChange?: (dateString: string) => void;
onMonthYearChange?: (dateString: string) => void;
onTimeChange?: (dateString: string) => void;
onTimePeriodChange?: (dateStringList: string[]) => void;
onDateChange?: (dateString: string) => void;
minimumDate?: string;
maximumDate?: string;
selectorStartingYear?: number;
selectorEndingYear?: number;
disableDateChange?: boolean;
isGregorian?: boolean;
mode?: 'datepicker' | 'calendar' | 'monthYear' | 'time' | 'period';
minuteInterval?: 1 | 2 | 3 | 4 | 5 | 6 | 10 | 12 | 15 | 20 | 30 | 60;
style?: CSSProperties;
current?: string;
selected?: string;
options?: {
backgroundColor?: string;
textHeaderColor?: string;
textDefaultColor?: string;
selectedTextColor?: string;
mainColor?: string;
textSecondaryColor?: string;
borderColor?: string;
defaultFont?: string;
headerFont?: string;
textFontSize?: number;
textHeaderFontSize?: number;
headerAnimationDistance?: number;
daysAnimationDistance?: number;
};
locale?: string
}
export default function(props: ModernDatepickerProps): JSX.Element;
export function getToday(): string;
export function getFormatedDate(date?: Date, format?: string): string;