@izonnet-web-solution/react-native-date-time-picker-kit 0.0.0-stage → 1.0.1

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.
Files changed (216) hide show
  1. package/DateTimePickerKit.podspec +22 -0
  2. package/LICENSE +20 -0
  3. package/README.md +652 -2
  4. package/android/build.gradle +36 -0
  5. package/android/src/main/AndroidManifest.xml +2 -0
  6. package/android/src/main/java/com/datetimepickerkit/DatePickerHelper.kt +185 -0
  7. package/android/src/main/java/com/datetimepickerkit/DateTimePickerHelper.kt +214 -0
  8. package/android/src/main/java/com/datetimepickerkit/DateTimePickerKitModule.kt +258 -0
  9. package/android/src/main/java/com/datetimepickerkit/DateTimePickerKitPackage.kt +30 -0
  10. package/android/src/main/java/com/datetimepickerkit/TimePickerHelper.kt +208 -0
  11. package/ios/DateTimePickerKit.h +11 -0
  12. package/ios/DateTimePickerKit.mm +84 -0
  13. package/ios/DateTimePickerModule.swift +474 -0
  14. package/lib/module/NativeDateTimePickerKit.js +5 -0
  15. package/lib/module/NativeDateTimePickerKit.js.map +1 -0
  16. package/lib/module/components/CalendarPicker.js +419 -0
  17. package/lib/module/components/CalendarPicker.js.map +1 -0
  18. package/lib/module/components/ClockPicker.js +273 -0
  19. package/lib/module/components/ClockPicker.js.map +1 -0
  20. package/lib/module/components/DatePicker.js +181 -0
  21. package/lib/module/components/DatePicker.js.map +1 -0
  22. package/lib/module/components/DateRangePicker.js +158 -0
  23. package/lib/module/components/DateRangePicker.js.map +1 -0
  24. package/lib/module/components/DateTimePicker.js +674 -0
  25. package/lib/module/components/DateTimePicker.js.map +1 -0
  26. package/lib/module/components/MonthPicker.js +145 -0
  27. package/lib/module/components/MonthPicker.js.map +1 -0
  28. package/lib/module/components/TimePicker.js +142 -0
  29. package/lib/module/components/TimePicker.js.map +1 -0
  30. package/lib/module/components/TimeSlotPicker.js +118 -0
  31. package/lib/module/components/TimeSlotPicker.js.map +1 -0
  32. package/lib/module/components/WheelPicker.js +159 -0
  33. package/lib/module/components/WheelPicker.js.map +1 -0
  34. package/lib/module/components/YearPicker.js +151 -0
  35. package/lib/module/components/YearPicker.js.map +1 -0
  36. package/lib/module/components/common/ModalWrapper.js +136 -0
  37. package/lib/module/components/common/ModalWrapper.js.map +1 -0
  38. package/lib/module/components/common/PickerHeader.js +82 -0
  39. package/lib/module/components/common/PickerHeader.js.map +1 -0
  40. package/lib/module/components/common/PresetsBar.js +66 -0
  41. package/lib/module/components/common/PresetsBar.js.map +1 -0
  42. package/lib/module/errors/DateTimePickerError.js +12 -0
  43. package/lib/module/errors/DateTimePickerError.js.map +1 -0
  44. package/lib/module/hooks/useDateTimePicker.js +73 -0
  45. package/lib/module/hooks/useDateTimePicker.js.map +1 -0
  46. package/lib/module/index.js +40 -0
  47. package/lib/module/index.js.map +1 -0
  48. package/lib/module/localization/index.js +6 -0
  49. package/lib/module/localization/index.js.map +1 -0
  50. package/lib/module/localization/locales.js +186 -0
  51. package/lib/module/localization/locales.js.map +1 -0
  52. package/lib/module/localization/types.js +2 -0
  53. package/lib/module/localization/types.js.map +1 -0
  54. package/lib/module/localization/useLocale.js +176 -0
  55. package/lib/module/localization/useLocale.js.map +1 -0
  56. package/lib/module/native/NativeDateTimePicker.js +110 -0
  57. package/lib/module/native/NativeDateTimePicker.js.map +1 -0
  58. package/lib/module/package.json +1 -0
  59. package/lib/module/presets/datePresets.js +75 -0
  60. package/lib/module/presets/datePresets.js.map +1 -0
  61. package/lib/module/presets/index.js +4 -0
  62. package/lib/module/presets/index.js.map +1 -0
  63. package/lib/module/slots/index.js +4 -0
  64. package/lib/module/slots/index.js.map +1 -0
  65. package/lib/module/slots/timeSlots.js +59 -0
  66. package/lib/module/slots/timeSlots.js.map +1 -0
  67. package/lib/module/theme/defaultTheme.js +91 -0
  68. package/lib/module/theme/defaultTheme.js.map +1 -0
  69. package/lib/module/theme/index.js +6 -0
  70. package/lib/module/theme/index.js.map +1 -0
  71. package/lib/module/theme/types.js +2 -0
  72. package/lib/module/theme/types.js.map +1 -0
  73. package/lib/module/theme/useTheme.js +81 -0
  74. package/lib/module/theme/useTheme.js.map +1 -0
  75. package/lib/module/types/events.js +4 -0
  76. package/lib/module/types/events.js.map +1 -0
  77. package/lib/module/types/index.js +7 -0
  78. package/lib/module/types/index.js.map +1 -0
  79. package/lib/module/types/native.js +2 -0
  80. package/lib/module/types/native.js.map +1 -0
  81. package/lib/module/types/presentation.js +2 -0
  82. package/lib/module/types/presentation.js.map +1 -0
  83. package/lib/module/types/props.js +4 -0
  84. package/lib/module/types/props.js.map +1 -0
  85. package/lib/module/utils/constants.js +14 -0
  86. package/lib/module/utils/constants.js.map +1 -0
  87. package/lib/module/utils/dateConversion.js +224 -0
  88. package/lib/module/utils/dateConversion.js.map +1 -0
  89. package/lib/module/utils/dateFormatting.js +102 -0
  90. package/lib/module/utils/dateFormatting.js.map +1 -0
  91. package/lib/module/utils/dateValidation.js +161 -0
  92. package/lib/module/utils/dateValidation.js.map +1 -0
  93. package/lib/module/utils/index.js +7 -0
  94. package/lib/module/utils/index.js.map +1 -0
  95. package/lib/typescript/package.json +1 -0
  96. package/lib/typescript/src/NativeDateTimePickerKit.d.ts +17 -0
  97. package/lib/typescript/src/NativeDateTimePickerKit.d.ts.map +1 -0
  98. package/lib/typescript/src/components/CalendarPicker.d.ts +51 -0
  99. package/lib/typescript/src/components/CalendarPicker.d.ts.map +1 -0
  100. package/lib/typescript/src/components/ClockPicker.d.ts +22 -0
  101. package/lib/typescript/src/components/ClockPicker.d.ts.map +1 -0
  102. package/lib/typescript/src/components/DatePicker.d.ts +44 -0
  103. package/lib/typescript/src/components/DatePicker.d.ts.map +1 -0
  104. package/lib/typescript/src/components/DateRangePicker.d.ts +56 -0
  105. package/lib/typescript/src/components/DateRangePicker.d.ts.map +1 -0
  106. package/lib/typescript/src/components/DateTimePicker.d.ts +7 -0
  107. package/lib/typescript/src/components/DateTimePicker.d.ts.map +1 -0
  108. package/lib/typescript/src/components/MonthPicker.d.ts +21 -0
  109. package/lib/typescript/src/components/MonthPicker.d.ts.map +1 -0
  110. package/lib/typescript/src/components/TimePicker.d.ts +31 -0
  111. package/lib/typescript/src/components/TimePicker.d.ts.map +1 -0
  112. package/lib/typescript/src/components/TimeSlotPicker.d.ts +18 -0
  113. package/lib/typescript/src/components/TimeSlotPicker.d.ts.map +1 -0
  114. package/lib/typescript/src/components/WheelPicker.d.ts +17 -0
  115. package/lib/typescript/src/components/WheelPicker.d.ts.map +1 -0
  116. package/lib/typescript/src/components/YearPicker.d.ts +14 -0
  117. package/lib/typescript/src/components/YearPicker.d.ts.map +1 -0
  118. package/lib/typescript/src/components/common/ModalWrapper.d.ts +11 -0
  119. package/lib/typescript/src/components/common/ModalWrapper.d.ts.map +1 -0
  120. package/lib/typescript/src/components/common/PickerHeader.d.ts +13 -0
  121. package/lib/typescript/src/components/common/PickerHeader.d.ts.map +1 -0
  122. package/lib/typescript/src/components/common/PresetsBar.d.ts +12 -0
  123. package/lib/typescript/src/components/common/PresetsBar.d.ts.map +1 -0
  124. package/lib/typescript/src/errors/DateTimePickerError.d.ts +7 -0
  125. package/lib/typescript/src/errors/DateTimePickerError.d.ts.map +1 -0
  126. package/lib/typescript/src/hooks/useDateTimePicker.d.ts +17 -0
  127. package/lib/typescript/src/hooks/useDateTimePicker.d.ts.map +1 -0
  128. package/lib/typescript/src/index.d.ts +23 -0
  129. package/lib/typescript/src/index.d.ts.map +1 -0
  130. package/lib/typescript/src/localization/index.d.ts +4 -0
  131. package/lib/typescript/src/localization/index.d.ts.map +1 -0
  132. package/lib/typescript/src/localization/locales.d.ts +12 -0
  133. package/lib/typescript/src/localization/locales.d.ts.map +1 -0
  134. package/lib/typescript/src/localization/types.d.ts +23 -0
  135. package/lib/typescript/src/localization/types.d.ts.map +1 -0
  136. package/lib/typescript/src/localization/useLocale.d.ts +31 -0
  137. package/lib/typescript/src/localization/useLocale.d.ts.map +1 -0
  138. package/lib/typescript/src/native/NativeDateTimePicker.d.ts +14 -0
  139. package/lib/typescript/src/native/NativeDateTimePicker.d.ts.map +1 -0
  140. package/lib/typescript/src/presets/datePresets.d.ts +8 -0
  141. package/lib/typescript/src/presets/datePresets.d.ts.map +1 -0
  142. package/lib/typescript/src/presets/index.d.ts +2 -0
  143. package/lib/typescript/src/presets/index.d.ts.map +1 -0
  144. package/lib/typescript/src/slots/index.d.ts +2 -0
  145. package/lib/typescript/src/slots/index.d.ts.map +1 -0
  146. package/lib/typescript/src/slots/timeSlots.d.ts +18 -0
  147. package/lib/typescript/src/slots/timeSlots.d.ts.map +1 -0
  148. package/lib/typescript/src/theme/defaultTheme.d.ts +9 -0
  149. package/lib/typescript/src/theme/defaultTheme.d.ts.map +1 -0
  150. package/lib/typescript/src/theme/index.d.ts +4 -0
  151. package/lib/typescript/src/theme/index.d.ts.map +1 -0
  152. package/lib/typescript/src/theme/types.d.ts +76 -0
  153. package/lib/typescript/src/theme/types.d.ts.map +1 -0
  154. package/lib/typescript/src/theme/useTheme.d.ts +4 -0
  155. package/lib/typescript/src/theme/useTheme.d.ts.map +1 -0
  156. package/lib/typescript/src/types/events.d.ts +8 -0
  157. package/lib/typescript/src/types/events.d.ts.map +1 -0
  158. package/lib/typescript/src/types/index.d.ts +5 -0
  159. package/lib/typescript/src/types/index.d.ts.map +1 -0
  160. package/lib/typescript/src/types/native.d.ts +26 -0
  161. package/lib/typescript/src/types/native.d.ts.map +1 -0
  162. package/lib/typescript/src/types/presentation.d.ts +26 -0
  163. package/lib/typescript/src/types/presentation.d.ts.map +1 -0
  164. package/lib/typescript/src/types/props.d.ts +221 -0
  165. package/lib/typescript/src/types/props.d.ts.map +1 -0
  166. package/lib/typescript/src/utils/constants.d.ts +12 -0
  167. package/lib/typescript/src/utils/constants.d.ts.map +1 -0
  168. package/lib/typescript/src/utils/dateConversion.d.ts +46 -0
  169. package/lib/typescript/src/utils/dateConversion.d.ts.map +1 -0
  170. package/lib/typescript/src/utils/dateFormatting.d.ts +8 -0
  171. package/lib/typescript/src/utils/dateFormatting.d.ts.map +1 -0
  172. package/lib/typescript/src/utils/dateValidation.d.ts +46 -0
  173. package/lib/typescript/src/utils/dateValidation.d.ts.map +1 -0
  174. package/lib/typescript/src/utils/index.d.ts +5 -0
  175. package/lib/typescript/src/utils/index.d.ts.map +1 -0
  176. package/package.json +191 -4
  177. package/src/NativeDateTimePickerKit.ts +19 -0
  178. package/src/components/CalendarPicker.tsx +623 -0
  179. package/src/components/ClockPicker.tsx +403 -0
  180. package/src/components/DatePicker.tsx +276 -0
  181. package/src/components/DateRangePicker.tsx +251 -0
  182. package/src/components/DateTimePicker.tsx +1028 -0
  183. package/src/components/MonthPicker.tsx +216 -0
  184. package/src/components/TimePicker.tsx +203 -0
  185. package/src/components/TimeSlotPicker.tsx +163 -0
  186. package/src/components/WheelPicker.tsx +229 -0
  187. package/src/components/YearPicker.tsx +228 -0
  188. package/src/components/common/ModalWrapper.tsx +192 -0
  189. package/src/components/common/PickerHeader.tsx +121 -0
  190. package/src/components/common/PresetsBar.tsx +104 -0
  191. package/src/errors/DateTimePickerError.ts +29 -0
  192. package/src/hooks/useDateTimePicker.ts +100 -0
  193. package/src/index.tsx +92 -0
  194. package/src/localization/index.ts +3 -0
  195. package/src/localization/locales.ts +499 -0
  196. package/src/localization/types.ts +21 -0
  197. package/src/localization/useLocale.ts +197 -0
  198. package/src/native/NativeDateTimePicker.ts +154 -0
  199. package/src/presets/datePresets.ts +97 -0
  200. package/src/presets/index.ts +1 -0
  201. package/src/slots/index.ts +1 -0
  202. package/src/slots/timeSlots.ts +89 -0
  203. package/src/theme/defaultTheme.ts +102 -0
  204. package/src/theme/index.ts +3 -0
  205. package/src/theme/types.ts +82 -0
  206. package/src/theme/useTheme.ts +98 -0
  207. package/src/types/events.ts +8 -0
  208. package/src/types/index.ts +4 -0
  209. package/src/types/native.ts +28 -0
  210. package/src/types/presentation.ts +28 -0
  211. package/src/types/props.ts +291 -0
  212. package/src/utils/constants.ts +15 -0
  213. package/src/utils/dateConversion.ts +273 -0
  214. package/src/utils/dateFormatting.ts +166 -0
  215. package/src/utils/dateValidation.ts +178 -0
  216. package/src/utils/index.ts +4 -0
@@ -0,0 +1,221 @@
1
+ import type { NativePickerAction, NativePickerDisplay, NativePickerMode, NativePickerTheme } from './native.js';
2
+ import type { DateTimePickerCancelEvent, DateTimePickerChangeEvent, DateTimePickerConfirmEvent, DateTimePickerDismissEvent, DateTimePickerErrorEvent, DateTimePickerOpenEvent } from './events.js';
3
+ import type { ThemeColorsOverride, ThemeConfig, ThemeMode } from '../theme/types.js';
4
+ import type { PartialLocaleData } from '../localization/types.js';
5
+ import type { BaseModalProps, PresentationMode } from './presentation.js';
6
+ import type { MarkedDatesMap } from '../components/CalendarPicker.js';
7
+ import type { DatePreset } from '../presets/index.js';
8
+ export type MinuteInterval = 1 | 2 | 3 | 4 | 5 | 6 | 10 | 12 | 15 | 20 | 30;
9
+ export type PickerMode = NativePickerMode;
10
+ export type PickerTheme = NativePickerTheme | ThemeMode;
11
+ export type PickerDisplay = NativePickerDisplay;
12
+ export type PickerPresentation = PresentationMode;
13
+ export interface TimeObject {
14
+ hour: number;
15
+ minute: number;
16
+ second?: number;
17
+ }
18
+ export interface DateTimePickerProps extends Omit<BaseModalProps, 'onConfirm' | 'onCancel'> {
19
+ /**
20
+ * Selection mode for picker: 'date', 'time', 'datetime', or 'countdown'.
21
+ * @default 'date'
22
+ */
23
+ mode?: NativePickerMode;
24
+ /**
25
+ * Controlled Date value. Accepts Date object, numeric epoch timestamp, or ISO string.
26
+ */
27
+ value?: Date | number | string | null;
28
+ /**
29
+ * Uncontrolled initial Date value.
30
+ */
31
+ defaultValue?: Date | number | string | null;
32
+ /**
33
+ * Native display presentation style on iOS/Android (e.g. 'compact', 'inline', 'spinner', 'clock').
34
+ * @default 'default'
35
+ */
36
+ display?: NativePickerDisplay;
37
+ /**
38
+ * Whether the picker interactions are disabled.
39
+ * @default false
40
+ */
41
+ disabled?: boolean;
42
+ /**
43
+ * Presentation mode: 'native' (OS dialog), 'inline', 'modal', 'bottom-sheet', or 'fullscreen'.
44
+ * @default 'native'
45
+ */
46
+ presentation?: PresentationMode;
47
+ /**
48
+ * Minimum selectable date/time boundary. Selection before this timestamp is prevented/clamped.
49
+ */
50
+ minimumDate?: Date | number | string;
51
+ /**
52
+ * Alias for `minimumDate`.
53
+ */
54
+ minDate?: Date | number | string;
55
+ /**
56
+ * Maximum selectable date/time boundary. Selection after this timestamp is prevented/clamped.
57
+ */
58
+ maximumDate?: Date | number | string;
59
+ /**
60
+ * Alias for `maximumDate`.
61
+ */
62
+ maxDate?: Date | number | string;
63
+ /**
64
+ * Minimum allowable time components (e.g. "09:00" or { hour: 9, minute: 0 }).
65
+ */
66
+ minimumTime?: string | TimeObject;
67
+ /**
68
+ * Maximum allowable time components (e.g. "17:00" or { hour: 17, minute: 0 }).
69
+ */
70
+ maximumTime?: string | TimeObject;
71
+ /**
72
+ * Minute snapping interval (1, 2, 3, 4, 5, 6, 10, 12, 15, 20, or 30).
73
+ * @default 1
74
+ */
75
+ minuteInterval?: MinuteInterval;
76
+ /**
77
+ * Specific dates to disable from selection.
78
+ */
79
+ disabledDates?: (Date | string)[];
80
+ /**
81
+ * Weekdays to disable from selection (0 = Sunday, 1 = Monday, ..., 6 = Saturday).
82
+ */
83
+ disabledWeekdays?: number[];
84
+ /**
85
+ * Map of marked dates with colored dots, badges, or custom highlights.
86
+ */
87
+ markedDates?: MarkedDatesMap;
88
+ /**
89
+ * Locale string identifier (e.g. 'en', 'hi', 'gu', 'ar', 'es') or custom LocaleData object.
90
+ * @default Device locale
91
+ */
92
+ locale?: string | PartialLocaleData;
93
+ /**
94
+ * Target IANA timezone identifier (e.g. 'America/New_York', 'Asia/Kolkata').
95
+ */
96
+ timeZone?: string;
97
+ /**
98
+ * Alias for `timeZone`.
99
+ */
100
+ timeZoneName?: string;
101
+ /**
102
+ * Explicit UTC offset in minutes (e.g. 330 for IST +05:30).
103
+ */
104
+ timeZoneOffsetInMinutes?: number;
105
+ /**
106
+ * UTC offset in hours or minutes (e.g. 5.5 or 330).
107
+ */
108
+ utcOffset?: number;
109
+ /**
110
+ * Explicit override for 24-hour time representation.
111
+ */
112
+ is24Hour?: boolean;
113
+ /**
114
+ * First day of the week (0 = Sunday, 1 = Monday, 6 = Saturday).
115
+ */
116
+ firstDayOfWeek?: number;
117
+ /**
118
+ * Visual theme mode ('light', 'dark', 'auto') or comprehensive ThemeConfig object.
119
+ * @default 'auto'
120
+ */
121
+ theme?: NativePickerTheme | ThemeMode | ThemeConfig;
122
+ /**
123
+ * Convenient color override palette for quick styling without breaking layouts.
124
+ */
125
+ themeColors?: ThemeColorsOverride;
126
+ /**
127
+ * Optional custom style overrides for modal header, button, or container.
128
+ */
129
+ styles?: {
130
+ headerStyle?: any;
131
+ confirmButtonStyle?: any;
132
+ cancelButtonStyle?: any;
133
+ containerStyle?: any;
134
+ };
135
+ /**
136
+ * Title text displayed in header or native dialog.
137
+ */
138
+ title?: string;
139
+ /**
140
+ * Confirm button action label.
141
+ */
142
+ confirmText?: string;
143
+ /**
144
+ * Cancel button action label.
145
+ */
146
+ cancelText?: string;
147
+ /**
148
+ * Accent color override.
149
+ */
150
+ accentColor?: string;
151
+ /**
152
+ * Text color override.
153
+ */
154
+ textColor?: string;
155
+ /**
156
+ * Background color override.
157
+ */
158
+ backgroundColor?: string;
159
+ /**
160
+ * Whether to show quick date presets bar (Today, Yesterday, Last 7 Days, This Month).
161
+ * @default false
162
+ */
163
+ showPresets?: boolean;
164
+ /**
165
+ * Custom date presets to display.
166
+ */
167
+ customPresets?: DatePreset[];
168
+ /**
169
+ * Callback fired on any intermediate date or time selection change.
170
+ */
171
+ onChange?: DateTimePickerChangeEvent;
172
+ /**
173
+ * Callback fired when selection is confirmed with the final Date object.
174
+ */
175
+ onConfirm?: DateTimePickerConfirmEvent;
176
+ /**
177
+ * Callback fired when picker is cancelled or closed without confirmation.
178
+ */
179
+ onCancel?: DateTimePickerCancelEvent;
180
+ /**
181
+ * Callback fired on native dialog dismissal.
182
+ */
183
+ onDismiss?: DateTimePickerDismissEvent;
184
+ /**
185
+ * Callback fired when picker modal opens.
186
+ */
187
+ onOpen?: DateTimePickerOpenEvent;
188
+ /**
189
+ * Callback fired when an error occurs during presentation or validation.
190
+ */
191
+ onError?: DateTimePickerErrorEvent;
192
+ /**
193
+ * Test identifier for automation testing.
194
+ */
195
+ testID?: string;
196
+ /**
197
+ * Declarative open control flag.
198
+ */
199
+ open?: boolean;
200
+ /**
201
+ * Alias for `open` or `visible`.
202
+ */
203
+ isVisible?: boolean;
204
+ }
205
+ export interface DateTimePickerRef {
206
+ open: () => Promise<Date | null>;
207
+ close: () => Promise<boolean>;
208
+ confirm: () => Promise<Date | null>;
209
+ cancel: () => Promise<boolean>;
210
+ reset: () => void;
211
+ getValue: () => Date | null;
212
+ setValue: (date: Date | number | string) => void;
213
+ }
214
+ export interface OpenPickerOptions extends Omit<DateTimePickerProps, 'open' | 'testID'> {
215
+ value?: Date | number | string;
216
+ }
217
+ export interface PickerResultEvent {
218
+ action: NativePickerAction;
219
+ date: Date | null;
220
+ }
221
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/types/props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,aAAU,CAAC;AAClB,OAAO,KAAK,EACV,yBAAyB,EACzB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,aAAU,CAAC;AAClB,OAAO,KAAK,EACV,mBAAmB,EACnB,WAAW,EACX,SAAS,EACV,MAAM,mBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAgB,CAAC;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AED,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAC7C,mBAAmB,EACnB,MAAM,GAAG,QAAQ,CAClB;IACC,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;CACnB"}
@@ -0,0 +1,12 @@
1
+ export declare const VALID_MINUTE_INTERVALS: readonly [1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30];
2
+ export declare const DEFAULT_CONFIRM_TEXT = "Confirm";
3
+ export declare const DEFAULT_CANCEL_TEXT = "Cancel";
4
+ export declare const DEFAULT_TITLE = "";
5
+ export declare const DEFAULT_MODE = "date";
6
+ export declare const DEFAULT_DISPLAY = "default";
7
+ export declare const DEFAULT_THEME = "auto";
8
+ export declare const MILLISECONDS_IN_SECOND = 1000;
9
+ export declare const MILLISECONDS_IN_MINUTE: number;
10
+ export declare const MILLISECONDS_IN_HOUR: number;
11
+ export declare const MILLISECONDS_IN_DAY: number;
12
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,iDAEzB,CAAC;AAEX,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAC5C,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,YAAY,SAAS,CAAC;AACnC,eAAO,MAAM,eAAe,YAAY,CAAC;AACzC,eAAO,MAAM,aAAa,SAAS,CAAC;AAEpC,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,sBAAsB,QAA8B,CAAC;AAClE,eAAO,MAAM,oBAAoB,QAA8B,CAAC;AAChE,eAAO,MAAM,mBAAmB,QAA4B,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Pure TypeScript Date Conversion Utilities
3
+ * Zero external dependencies.
4
+ */
5
+ export declare function parseDate(input: unknown): Date | null;
6
+ export declare function dateToTimestamp(input: unknown): number | null;
7
+ export declare function timestampToDate(timestamp: number): Date;
8
+ export declare function isLeapYear(year: number): boolean;
9
+ export declare function getDaysInMonth(year: number, month: number): number;
10
+ export declare function padZero(num: number, size?: number): string;
11
+ /**
12
+ * Serializes local date as YYYY-MM-DD
13
+ */
14
+ export declare function serializeDateOnly(date: Date): string;
15
+ /**
16
+ * Serializes local time as HH:mm or hh:mm a
17
+ */
18
+ export declare function serializeTimeOnly(date: Date, is24Hour?: boolean): string;
19
+ /**
20
+ * Serializes date & time to local ISO string: YYYY-MM-DDTHH:mm:ss
21
+ */
22
+ export declare function serializeDateTime(date: Date): string;
23
+ export declare function startOfDay(date: Date): Date;
24
+ export declare function endOfDay(date: Date): Date;
25
+ export declare function addDays(date: Date, days: number): Date;
26
+ export declare function cloneDate(date: Date): Date;
27
+ /**
28
+ * Clamps a day of month to the valid range [1, daysInMonth] for a given year and month.
29
+ * Fixes edge cases when switching months (e.g. Jan 31 -> Feb 28 or 29 in leap years).
30
+ */
31
+ export declare function clampMonthDay(year: number, month: number, day: number): number;
32
+ /**
33
+ * Clamps a date strictly within an optional [minimumDate, maximumDate] range.
34
+ */
35
+ export declare function clampDate(date: unknown, minDate?: unknown, maxDate?: unknown): Date | null;
36
+ /**
37
+ * Dynamically clamps a date's time components (hour, minute) if date falls on the
38
+ * same calendar day as minimumDate or maximumDate.
39
+ */
40
+ export declare function clampTime(date: Date, minDate?: unknown, maxDate?: unknown): Date;
41
+ /**
42
+ * Normalizes a date using a target IANA timezone (e.g. "America/New_York", "Asia/Kolkata")
43
+ * or a UTC offset in minutes, returning a Date object reflecting the local components in that zone.
44
+ */
45
+ export declare function normalizeDateWithTimezone(date: Date, timeZone?: string, utcOffsetMinutes?: number): Date;
46
+ //# sourceMappingURL=dateConversion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AgB,SAAS,CACvB,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE,OAAO,EACjB,OAAO,CAAC,EAAE,OAAO,GAChB,IAAI,GAAG,IAAI,CAkBb;AAED;;;GAGG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,OAAO,EACjB,OAAO,CAAC,EAAE,OAAO,GAChB,IAAI,CAiCN;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,IAAI,EACV,QAAQ,CAAC,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,MAAM,GACxB,IAAI,CAqDN"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Formats a Date object according to a format string pattern.
3
+ * Tokens supported:
4
+ * YYYY, YY, MMMM, MMM, MM, M, DD, D, dddd, ddd, HH, H, hh, h, mm, m, ss, s, A, a
5
+ */
6
+ export declare function formatDate(date: Date, formatStr: string, locale?: string): string;
7
+ export declare function formatTime(hour: number, minute: number, is24Hour?: boolean): string;
8
+ //# sourceMappingURL=dateFormatting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateFormatting.d.ts","sourceRoot":"","sources":["../../../../src/utils/dateFormatting.ts"],"names":[],"mappings":"AA8EA;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAoER;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,UAAQ,GACf,MAAM,CAIR"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Validates that an input resolves to a valid, non-NaN Date.
3
+ */
4
+ export declare function validateDate(date: unknown): boolean;
5
+ /**
6
+ * Validates 24-hour time components.
7
+ */
8
+ export declare function validateTime(hour: number, minute: number): boolean;
9
+ /**
10
+ * Validates that a date range is valid: both dates are valid and start <= end.
11
+ */
12
+ export declare function validateDateRange(startDate: unknown, endDate: unknown): boolean;
13
+ /**
14
+ * Checks if a date is strictly before another date.
15
+ */
16
+ export declare function isDateBefore(date: unknown, compareDate: unknown): boolean;
17
+ /**
18
+ * Checks if a date is strictly after another date.
19
+ */
20
+ export declare function isDateAfter(date: unknown, compareDate: unknown): boolean;
21
+ /**
22
+ * Checks if a date falls within an optional [minimumDate, maximumDate] range.
23
+ */
24
+ export declare function isDateWithinRange(date: unknown, minDate?: unknown, maxDate?: unknown): boolean;
25
+ /**
26
+ * Checks if the weekday of a date is disabled.
27
+ * 0 = Sunday, 1 = Monday, ..., 6 = Saturday
28
+ */
29
+ export declare function isWeekdayDisabled(date: unknown, disabledWeekdays?: number[]): boolean;
30
+ /**
31
+ * Checks if a date is disabled either specifically in disabledDates or by weekday.
32
+ */
33
+ export declare function isDateDisabled(date: unknown, disabledDates?: unknown[], disabledWeekdays?: number[]): boolean;
34
+ /**
35
+ * Validates that date is >= minDate.
36
+ */
37
+ export declare function validateMinimumDate(date: unknown, minDate: unknown): boolean;
38
+ /**
39
+ * Validates that date is <= maxDate.
40
+ */
41
+ export declare function validateMaximumDate(date: unknown, maxDate: unknown): boolean;
42
+ /**
43
+ * Validates that the minute interval is a valid divisor of 60.
44
+ */
45
+ export declare function validateMinuteInterval(interval?: number): boolean;
46
+ //# sourceMappingURL=dateValidation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateValidation.d.ts","sourceRoot":"","sources":["../../../../src/utils/dateValidation.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAGnD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAQlE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,OAAO,GACf,OAAO,CAOT;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,GAAG,OAAO,CAOzE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,GAAG,OAAO,CAOxE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE,OAAO,EACjB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAqBT;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,OAAO,EACb,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAC1B,OAAO,CAUT;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,OAAO,EACb,aAAa,CAAC,EAAE,OAAO,EAAE,EACzB,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAC1B,OAAO,CAqBT;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAO5E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAO5E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAQjE"}
@@ -0,0 +1,5 @@
1
+ export * from './constants.js';
2
+ export * from './dateConversion.js';
3
+ export * from './dateValidation.js';
4
+ export * from './dateFormatting.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAa,CAAC;AAC5B,cAAc,qBAAkB,CAAC;AACjC,cAAc,qBAAkB,CAAC;AACjC,cAAc,qBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,193 @@
1
1
  {
2
2
  "name": "@izonnet-web-solution/react-native-date-time-picker-kit",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.1",
4
+ "description": "A lightweight React Native date and time picker library built with native iOS and Android components using Swift and Kotlin. Supports date, time, and datetime selection with validation, min/max date, locale, 12/24-hour format, and customizable callbacks. No third-party runtime picker dependencies.",
5
+ "main": "./lib/module/index.js",
6
+ "types": "./lib/typescript/src/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "react-native-date-time-picker-kit-source": "./src/index.tsx",
10
+ "types": "./lib/typescript/src/index.d.ts",
11
+ "default": "./lib/module/index.js"
12
+ },
13
+ "./package.json": "./package.json"
14
+ },
15
+ "files": [
16
+ "src",
17
+ "lib",
18
+ "android",
19
+ "ios",
20
+ "cpp",
21
+ "*.podspec",
22
+ "react-native.config.js",
23
+ "!ios/build",
24
+ "!android/build",
25
+ "!android/gradle",
26
+ "!android/gradlew",
27
+ "!android/gradlew.bat",
28
+ "!android/local.properties",
29
+ "!**/__tests__",
30
+ "!**/__fixtures__",
31
+ "!**/__mocks__",
32
+ "!**/.*"
33
+ ],
34
+ "scripts": {
35
+ "example": "yarn workspace react-native-date-time-picker-kit-example",
36
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
37
+ "prepare": "bob build",
38
+ "typecheck": "tsc",
39
+ "lint": "NODE_OPTIONS='--experimental-require-module' eslint \"src/**/*.{ts,tsx}\" \"__tests__/**/*.{ts,tsx}\"",
40
+ "test": "NODE_OPTIONS='--experimental-require-module' jest --watchman=false",
41
+ "release": "release-it --only-version"
42
+ },
43
+ "keywords": [
44
+ "react-native",
45
+ "ios",
46
+ "android",
47
+ "expo",
48
+ "date-picker",
49
+ "time-picker",
50
+ "datetime-picker",
51
+ "wheel-picker",
52
+ "calendar-picker",
53
+ "clock-picker",
54
+ "typescript"
55
+ ],
56
+ "repository": {
57
+ "type": "git",
58
+ "url": "git+https://github.com/Izonnet-Web-Solution/react-native-date-time-picker-kit.git"
59
+ },
60
+ "author": "IzoMalay <malay@izonnet.com> (https://github.com/Izonnet-Web-Solution)",
61
+ "license": "MIT",
62
+ "bugs": {
63
+ "url": "https://github.com/Izonnet-Web-Solution/react-native-date-time-picker-kit/issues"
64
+ },
65
+ "homepage": "https://github.com/Izonnet-Web-Solution/react-native-date-time-picker-kit#readme",
66
+ "publishConfig": {
67
+ "registry": "https://registry.npmjs.org/",
68
+ "access": "public"
69
+ },
70
+ "devDependencies": {
71
+ "@commitlint/config-conventional": "^21.2.4",
72
+ "@eslint/compat": "^2.1.1",
73
+ "@eslint/eslintrc": "^3.3.7",
74
+ "@eslint/js": "^9.39.5",
75
+ "@jest/globals": "^29.7.0",
76
+ "@react-native/babel-preset": "0.88.0",
77
+ "@react-native/eslint-config": "0.88.0",
78
+ "@react-native/jest-preset": "0.88.0",
79
+ "@release-it/conventional-changelog": "^12.0.2",
80
+ "@types/react": "^19.2.0",
81
+ "commitlint": "^21.2.4",
82
+ "del-cli": "^8.0.1",
83
+ "eslint": "^9.39.5",
84
+ "eslint-config-prettier": "^10.1.8",
85
+ "eslint-plugin-ft-flow": "^3.0.11",
86
+ "eslint-plugin-prettier": "^5.5.7",
87
+ "jest": "^29.7.0",
88
+ "lefthook": "^2.2.2",
89
+ "prettier": "^3.9.10",
90
+ "react": "19.3.0",
91
+ "react-native": "0.88.0",
92
+ "react-native-builder-bob": "^0.44.1",
93
+ "release-it": "^21.1.1",
94
+ "turbo": "^2.11.10",
95
+ "typescript": "^6.0.3"
96
+ },
97
+ "peerDependencies": {
98
+ "react": ">=18.0.0",
99
+ "react-native": ">=0.72.0"
100
+ },
101
+ "workspaces": [
102
+ "example"
103
+ ],
104
+ "packageManager": "yarn@4.18.1",
105
+ "react-native-builder-bob": {
106
+ "source": "src",
107
+ "output": "lib",
108
+ "targets": [
109
+ [
110
+ "module",
111
+ {
112
+ "esm": true
113
+ }
114
+ ],
115
+ [
116
+ "typescript",
117
+ {
118
+ "project": "tsconfig.build.json"
119
+ }
120
+ ]
121
+ ]
122
+ },
123
+ "codegenConfig": {
124
+ "name": "DateTimePickerKitSpec",
125
+ "type": "modules",
126
+ "jsSrcsDir": "src",
127
+ "android": {
128
+ "javaPackageName": "com.datetimepickerkit"
129
+ }
130
+ },
131
+ "prettier": {
132
+ "quoteProps": "consistent",
133
+ "singleQuote": true,
134
+ "tabWidth": 2,
135
+ "trailingComma": "es5",
136
+ "useTabs": false
137
+ },
138
+ "jest": {
139
+ "preset": "@react-native/jest-preset",
140
+ "testEnvironmentOptions": {
141
+ "customExportConditions": [
142
+ "require",
143
+ "react-native",
144
+ "react-native-date-time-picker-kit-source"
145
+ ]
146
+ },
147
+ "modulePathIgnorePatterns": [
148
+ "<rootDir>/example/node_modules",
149
+ "<rootDir>/lib/"
150
+ ]
151
+ },
152
+ "commitlint": {
153
+ "extends": [
154
+ "@commitlint/config-conventional"
155
+ ]
156
+ },
157
+ "dependenciesMeta": {
158
+ "lefthook": {
159
+ "built": true
160
+ }
161
+ },
162
+ "release-it": {
163
+ "git": {
164
+ "commitMessage": "chore: release ${version}",
165
+ "tagName": "v${version}"
166
+ },
167
+ "npm": {
168
+ "publish": true
169
+ },
170
+ "github": {
171
+ "release": true
172
+ },
173
+ "plugins": {
174
+ "@release-it/conventional-changelog": {
175
+ "preset": {
176
+ "name": "angular"
177
+ }
178
+ }
179
+ }
180
+ },
181
+ "create-react-native-library": {
182
+ "type": "turbo-module",
183
+ "languages": "kotlin-objc",
184
+ "tools": [
185
+ "eslint",
186
+ "jest",
187
+ "lefthook",
188
+ "release-it",
189
+ "vite"
190
+ ],
191
+ "version": "0.64.0"
192
+ }
193
+ }
@@ -0,0 +1,19 @@
1
+ import type { TurboModule } from 'react-native';
2
+ import { TurboModuleRegistry } from 'react-native';
3
+
4
+ export type UnsafeObject = Object;
5
+
6
+ export interface Spec extends TurboModule {
7
+ openDatePicker(options: UnsafeObject): Promise<UnsafeObject>;
8
+ openTimePicker(options: UnsafeObject): Promise<UnsafeObject>;
9
+ openDateTimePicker(options: UnsafeObject): Promise<UnsafeObject>;
10
+ openCountdownPicker(options: UnsafeObject): Promise<UnsafeObject>;
11
+ closePicker(): Promise<boolean>;
12
+ confirmPicker(): Promise<UnsafeObject>;
13
+ cancelPicker(): Promise<boolean>;
14
+ setSelectedDate(timestamp: number): Promise<boolean>;
15
+ getSelectedDate(): Promise<UnsafeObject>;
16
+ resetPicker(): Promise<boolean>;
17
+ }
18
+
19
+ export default TurboModuleRegistry.getEnforcing<Spec>('DateTimePickerKit');