@momo-kits/date-picker 0.79.5 → 0.79.6-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types.ts +56 -0
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -1,32 +1,88 @@
|
|
|
1
1
|
import {ViewStyle} from 'react-native';
|
|
2
2
|
|
|
3
3
|
export type DateTimePickerProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Optional. Specifies the format for displaying the date and time.
|
|
6
|
+
*/
|
|
4
7
|
format?: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Optional. The interval between minutes in the picker. For example, '15' would show minute options 0, 15, 30, 45, etc.
|
|
11
|
+
*/
|
|
5
12
|
minuteInterval?: number;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Optional. A callback function that is triggered when the date or time value changes.
|
|
16
|
+
*/
|
|
6
17
|
onChange?: (data: Date) => void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Optional. The initially selected date and time value.
|
|
21
|
+
*/
|
|
7
22
|
selectedValue?: Date;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Optional. The minimum date that can be selected.
|
|
26
|
+
*/
|
|
8
27
|
minDate?: Date;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Optional. The maximum date that can be selected.
|
|
31
|
+
*/
|
|
9
32
|
maxDate?: Date;
|
|
10
33
|
};
|
|
11
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Represents the data structure for individual date and time components.
|
|
37
|
+
*/
|
|
12
38
|
export type PickerDataObject = {
|
|
13
39
|
day: number;
|
|
14
40
|
month: number;
|
|
15
41
|
year: number;
|
|
16
42
|
hour: number;
|
|
17
43
|
min: number;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Optional. Specifies the mode of time presentation, e.g., 'AM' or 'PM'.
|
|
47
|
+
*/
|
|
18
48
|
timeMode?: string;
|
|
19
49
|
};
|
|
20
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Type representing a date object with a name identifying the component ('day', 'month', etc.) and the associated data.
|
|
53
|
+
*/
|
|
21
54
|
export type DateObject = {
|
|
22
55
|
name: 'day' | 'month' | 'year' | 'hour' | 'min' | 'timeMode';
|
|
23
56
|
data: string[];
|
|
24
57
|
};
|
|
25
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Properties for the WheelPicker component.
|
|
61
|
+
* This component provides a spinning-wheel style picker for selecting from provided data.
|
|
62
|
+
*/
|
|
26
63
|
export type WheelPickerProps = {
|
|
64
|
+
/**
|
|
65
|
+
* The name of the picker, used to identify it.
|
|
66
|
+
*/
|
|
27
67
|
name: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The data to be displayed and selected in the picker.
|
|
71
|
+
*/
|
|
28
72
|
data: string[];
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Custom styles to apply to the WheelPicker component.
|
|
76
|
+
*/
|
|
29
77
|
style: ViewStyle;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* A callback function that is triggered when the selected data changes.
|
|
81
|
+
*/
|
|
30
82
|
onChange: (name: string, data: string) => void;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The currently selected data in the picker.
|
|
86
|
+
*/
|
|
31
87
|
selectedData: string;
|
|
32
88
|
};
|