@izonnet-web-solution/react-native-date-time-picker-kit 1.0.2 → 1.0.3
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/README.md +429 -365
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,174 +1,160 @@
|
|
|
1
1
|
# @izonnet-web-solution/react-native-date-time-picker-kit
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A customizable date and time picker toolkit for React Native, combining native iOS and Android picker interfaces with JavaScript-based calendar, clock, wheel, and time-slot components.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@izonnet-web-solution/react-native-date-time-picker-kit)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
|
-
[
|
|
44
|
-
- [3. `TimePicker`](#3-timepicker)
|
|
45
|
-
- [4. `DateRangePicker`](#4-daterangepicker)
|
|
46
|
-
- [5. `CalendarPicker`](#5-calendarpicker)
|
|
47
|
-
- [6. `MonthPicker`](#6-monthpicker)
|
|
48
|
-
- [7. `YearPicker`](#7-yearpicker)
|
|
49
|
-
- [8. `ClockPicker`](#8-clockpicker)
|
|
50
|
-
- [9. `WheelPicker`](#9-wheelpicker)
|
|
51
|
-
- [10. `TimeSlotPicker`](#10-timeslotpicker)
|
|
52
|
-
10. [Quick Date Presets](#quick-date-presets)
|
|
53
|
-
11. [Appointment Time Slots](#appointment-time-slots)
|
|
54
|
-
12. [Localization & RTL](#localization--rtl)
|
|
55
|
-
13. [Imperative Ref APIs](#imperative-ref-apis)
|
|
56
|
-
14. [Custom Hook (`useDateTimePicker`)](#custom-hook-usedatetimepicker)
|
|
57
|
-
15. [Date Validation & Conversion Utilities](#date-validation--conversion-utilities)
|
|
58
|
-
16. [Error Handling & Error Codes](#error-handling--error-codes)
|
|
59
|
-
17. [Props Reference Table](#props-reference-table)
|
|
60
|
-
18. [Compatibility Matrix](#compatibility-matrix)
|
|
61
|
-
19. [Contributing](#contributing)
|
|
62
|
-
20. [License](#license)
|
|
63
|
-
|
|
64
|
-
---
|
|
7
|
+
[](https://www.typescriptlang.org/)
|
|
8
|
+
|
|
9
|
+
> **Documentation note:** This README is organized from the library documentation supplied with the request. Confirm the package's actual exports, TypeScript declarations, native setup, and supported React Native versions against the published release before treating every example as a guaranteed API contract.
|
|
10
|
+
|
|
11
|
+
## Contents
|
|
12
|
+
|
|
13
|
+
- [Overview](#overview)
|
|
14
|
+
- [Features](#features)
|
|
15
|
+
- [Platform support](#platform-support)
|
|
16
|
+
- [Installation](#installation)
|
|
17
|
+
- [Quick start](#quick-start)
|
|
18
|
+
- [Presentation modes](#presentation-modes)
|
|
19
|
+
- [Components](#components)
|
|
20
|
+
- [Themes](#themes)
|
|
21
|
+
- [Localization and RTL](#localization-and-rtl)
|
|
22
|
+
- [Presets and time slots](#presets-and-time-slots)
|
|
23
|
+
- [Ref methods](#ref-methods)
|
|
24
|
+
- [useDateTimePicker hook](#usedatetimepicker-hook)
|
|
25
|
+
- [Utilities](#utilities)
|
|
26
|
+
- [Error handling](#error-handling)
|
|
27
|
+
- [API reference](#api-reference)
|
|
28
|
+
- [Compatibility](#compatibility)
|
|
29
|
+
- [Troubleshooting](#troubleshooting)
|
|
30
|
+
- [Contributing](#contributing)
|
|
31
|
+
- [License](#license)
|
|
32
|
+
|
|
33
|
+
## Overview
|
|
34
|
+
|
|
35
|
+
The package provides a set of date and time selection components for React Native applications.
|
|
36
|
+
|
|
37
|
+
It combines:
|
|
38
|
+
|
|
39
|
+
- Native iOS picker UI implemented with Swift and UIKit.
|
|
40
|
+
- Native Android date and time dialogs implemented with Kotlin and the Android SDK.
|
|
41
|
+
- JavaScript-rendered components for calendar, month, year, clock, wheel, and time-slot selection.
|
|
42
|
+
- TypeScript APIs, date utilities, theming, localization, and right-to-left (RTL) support.
|
|
65
43
|
|
|
66
44
|
## Features
|
|
67
45
|
|
|
68
|
-
- **
|
|
69
|
-
- **
|
|
70
|
-
- **
|
|
71
|
-
- **
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
- **
|
|
78
|
-
- **
|
|
79
|
-
- **Advanced Features**: Date range selection, appointment time slot generator, quick presets (Today, Yesterday, Last 7 Days, This Month), marked dates with colored dots and badges.
|
|
80
|
-
- **Comprehensive Localization**: Device locale auto-detection, built-in locale presets (English, Hindi, Gujarati, Spanish, French, German, Arabic, Chinese, Japanese), custom locale overrides, and RTL layout support.
|
|
81
|
-
- **Developer Flexibility**: Declarative component, imperative ref methods, and custom React hook (`useDateTimePicker`).
|
|
46
|
+
- **Multiple selection modes:** date, time, datetime, and countdown.
|
|
47
|
+
- **Multiple presentations:** native, inline, modal, bottom sheet, and fullscreen.
|
|
48
|
+
- **10 picker components:** unified DateTimePicker, DatePicker, TimePicker, DateRangePicker, CalendarPicker, MonthPicker, YearPicker, ClockPicker, WheelPicker, and TimeSlotPicker.
|
|
49
|
+
- **Date constraints:** minimum and maximum values, disabled dates, disabled weekdays, and minute intervals.
|
|
50
|
+
- **Date ranges and presets:** select a date range or use standard/custom presets.
|
|
51
|
+
- **Calendar customization:** marked dates, colored dots, badges, and first-day-of-week configuration.
|
|
52
|
+
- **Theming:** light, dark, automatic system appearance, and custom theme configuration.
|
|
53
|
+
- **Localization:** documented built-in locales include English, Hindi, Gujarati, Spanish, French, German, Arabic, Chinese, and Japanese.
|
|
54
|
+
- **RTL support:** documented for Arabic layouts.
|
|
55
|
+
- **Developer APIs:** declarative components, imperative refs, a custom hook, and date utility functions.
|
|
56
|
+
- **No third-party runtime dependencies:** the supplied package documentation describes the runtime implementation as dependency-free.
|
|
82
57
|
|
|
83
|
-
|
|
58
|
+
## Platform support
|
|
84
59
|
|
|
85
|
-
|
|
60
|
+
| Platform | Native implementation | Minimum version stated in supplied documentation |
|
|
61
|
+
|---|---|---:|
|
|
62
|
+
| iOS | Swift, UIKit (`UIDatePicker`, `UIViewController`) | iOS 15.1+ |
|
|
63
|
+
| Android | Kotlin, Android SDK (`DatePickerDialog`, `TimePickerDialog`) | Android API 24+ |
|
|
86
64
|
|
|
87
|
-
|
|
88
|
-
| :--- | :--- | :--- | :--- |
|
|
89
|
-
| **iOS** | Swift 5.0 + UIKit (`UIDatePicker`, `UIViewController`) | TurboModule Spec (Obj-C++ JSI wrapper) | iOS 15.1+ |
|
|
90
|
-
| **Android** | Kotlin 1.9+ + Android SDK (`DatePickerDialog`, `TimePickerDialog`) | TurboModule Spec (JNI C++ / Java wrapper) | Android API 24+ (Android 7.0+) |
|
|
65
|
+
### React Native architecture
|
|
91
66
|
|
|
92
|
-
|
|
67
|
+
The supplied documentation describes the native module as using React Native Codegen and TurboModules.
|
|
93
68
|
|
|
94
|
-
|
|
95
|
-
- **Expo Compatibility:** Fully compatible with **Expo Prebuild** (`npx expo run:ios`, `npx expo run:android`) and **Expo Development Client** (`expo-dev-client`).
|
|
96
|
-
- **Note on Expo Go:** Because this library incorporates high-performance native Swift and Kotlin TurboModules, it requires a custom development client (`npx expo run:ios/android`) rather than standard Expo Go. Pure in-tree JS modes (`inline`, `modal`, `bottom-sheet`) work across all React Native platforms.
|
|
69
|
+
It states support for React Native 0.74 through 0.88+, with the New Architecture enabled. Treat this range as the README's stated compatibility claim and verify it against the specific package release and its CI matrix.
|
|
97
70
|
|
|
98
|
-
|
|
71
|
+
### Expo
|
|
99
72
|
|
|
100
|
-
|
|
73
|
+
The native picker functionality requires a native build. The supplied documentation describes support for Expo Prebuild and Development Builds, rather than the standard Expo Go app.
|
|
101
74
|
|
|
102
|
-
|
|
103
|
-
- All date calculations, range validations, leap-year handling, and token formatting are implemented in pure TypeScript.
|
|
104
|
-
- All animations utilize React Native's built-in `Animated` and native drivers.
|
|
105
|
-
- No heavy date libraries (`moment`, `date-fns`, `dayjs`) are introduced into your bundle.
|
|
75
|
+
For Expo projects, install the package and rebuild the native application after adding it. The JavaScript-rendered presentations (`inline`, `modal`, and `bottom-sheet`) are described as not requiring the native picker UI, but the package's actual import/native-module behavior should still be tested in your Expo setup.
|
|
106
76
|
|
|
107
|
-
|
|
77
|
+
## Installation
|
|
108
78
|
|
|
109
|
-
|
|
79
|
+
Install from npm:
|
|
110
80
|
|
|
111
81
|
```bash
|
|
112
|
-
# npm
|
|
113
82
|
npm install @izonnet-web-solution/react-native-date-time-picker-kit
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Or use Yarn:
|
|
114
86
|
|
|
115
|
-
|
|
87
|
+
```bash
|
|
116
88
|
yarn add @izonnet-web-solution/react-native-date-time-picker-kit
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Or pnpm:
|
|
117
92
|
|
|
118
|
-
|
|
93
|
+
```bash
|
|
119
94
|
pnpm add @izonnet-web-solution/react-native-date-time-picker-kit
|
|
120
95
|
```
|
|
121
96
|
|
|
122
|
-
### iOS
|
|
97
|
+
### iOS
|
|
123
98
|
|
|
124
99
|
Install CocoaPods dependencies:
|
|
125
100
|
|
|
126
101
|
```bash
|
|
127
|
-
cd ios
|
|
102
|
+
cd ios
|
|
103
|
+
pod install
|
|
104
|
+
cd ..
|
|
128
105
|
```
|
|
129
106
|
|
|
130
|
-
|
|
107
|
+
Then rebuild the iOS app.
|
|
131
108
|
|
|
132
|
-
### Android
|
|
109
|
+
### Android
|
|
133
110
|
|
|
134
|
-
|
|
111
|
+
Check the New Architecture setting in `android/gradle.properties`:
|
|
135
112
|
|
|
136
113
|
```properties
|
|
137
|
-
# android/gradle.properties
|
|
138
114
|
newArchEnabled=true
|
|
139
115
|
```
|
|
140
116
|
|
|
141
|
-
|
|
117
|
+
Then rebuild the Android app. If your project uses a different React Native architecture or build configuration, follow the requirements of the package version you installed.
|
|
118
|
+
|
|
119
|
+
> Native libraries require a native rebuild after installation. Reloading Metro alone is not sufficient.
|
|
142
120
|
|
|
143
|
-
## Quick
|
|
121
|
+
## Quick start
|
|
122
|
+
|
|
123
|
+
The following example demonstrates the documented `DateTimePicker` API in date mode.
|
|
144
124
|
|
|
145
125
|
```tsx
|
|
146
126
|
import React, { useState } from 'react';
|
|
147
|
-
import { View,
|
|
127
|
+
import { View, Text, Button } from 'react-native';
|
|
148
128
|
import {
|
|
149
129
|
DateTimePicker,
|
|
150
130
|
formatDate,
|
|
151
131
|
} from '@izonnet-web-solution/react-native-date-time-picker-kit';
|
|
152
132
|
|
|
153
|
-
export default function
|
|
154
|
-
const [
|
|
155
|
-
const [
|
|
133
|
+
export default function BasicDatePickerExample() {
|
|
134
|
+
const [selectedDate, setSelectedDate] = useState(new Date());
|
|
135
|
+
const [isPickerVisible, setPickerVisible] = useState(false);
|
|
156
136
|
|
|
157
137
|
return (
|
|
158
138
|
<View style={{ padding: 20 }}>
|
|
159
|
-
<Text>
|
|
160
|
-
|
|
139
|
+
<Text>
|
|
140
|
+
Selected date: {formatDate(selectedDate, 'YYYY-MM-DD')}
|
|
141
|
+
</Text>
|
|
142
|
+
|
|
143
|
+
<Button
|
|
144
|
+
title="Choose date"
|
|
145
|
+
onPress={() => setPickerVisible(true)}
|
|
146
|
+
/>
|
|
161
147
|
|
|
162
|
-
{
|
|
148
|
+
{isPickerVisible && (
|
|
163
149
|
<DateTimePicker
|
|
164
150
|
mode="date"
|
|
165
151
|
presentation="native"
|
|
166
|
-
value={
|
|
167
|
-
onConfirm={(
|
|
168
|
-
|
|
169
|
-
|
|
152
|
+
value={selectedDate}
|
|
153
|
+
onConfirm={(date) => {
|
|
154
|
+
setSelectedDate(date);
|
|
155
|
+
setPickerVisible(false);
|
|
170
156
|
}}
|
|
171
|
-
onCancel={() =>
|
|
157
|
+
onCancel={() => setPickerVisible(false)}
|
|
172
158
|
/>
|
|
173
159
|
)}
|
|
174
160
|
</View>
|
|
@@ -176,69 +162,37 @@ export default function BasicExample() {
|
|
|
176
162
|
}
|
|
177
163
|
```
|
|
178
164
|
|
|
179
|
-
|
|
165
|
+
## Presentation modes
|
|
180
166
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
All components support 5 presentation modes via the `presentation` prop:
|
|
167
|
+
Use the `presentation` prop to choose how a picker is displayed.
|
|
184
168
|
|
|
185
169
|
| Mode | Description |
|
|
186
|
-
|
|
187
|
-
| `
|
|
188
|
-
| `
|
|
189
|
-
| `
|
|
190
|
-
| `
|
|
191
|
-
| `
|
|
170
|
+
|---|---|
|
|
171
|
+
| `native` | Uses the platform's native picker interface. |
|
|
172
|
+
| `inline` | Renders the picker inside the current view hierarchy. |
|
|
173
|
+
| `modal` | Displays a centered modal dialog. |
|
|
174
|
+
| `bottom-sheet` | Displays a slide-up panel with a backdrop. |
|
|
175
|
+
| `fullscreen` | Displays a fullscreen overlay. |
|
|
176
|
+
|
|
177
|
+
Example:
|
|
192
178
|
|
|
193
179
|
```tsx
|
|
194
180
|
<DatePicker
|
|
195
|
-
presentation="bottom-sheet"
|
|
181
|
+
presentation="bottom-sheet"
|
|
196
182
|
value={new Date()}
|
|
197
|
-
onConfirmDate={(
|
|
183
|
+
onConfirmDate={(date) => {
|
|
184
|
+
console.log('Selected date:', date);
|
|
185
|
+
}}
|
|
198
186
|
/>
|
|
199
187
|
```
|
|
200
188
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
## Theme System
|
|
204
|
-
|
|
205
|
-
Built-in themes support light mode, dark mode, auto system scheme, or customized palettes.
|
|
206
|
-
|
|
207
|
-
### Built-in Modes
|
|
208
|
-
|
|
209
|
-
```tsx
|
|
210
|
-
<DateTimePicker theme="light" />
|
|
211
|
-
<DateTimePicker theme="dark" />
|
|
212
|
-
<DateTimePicker theme="auto" /> // Automatically follows device dark mode
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
### Custom Theme Configuration
|
|
216
|
-
|
|
217
|
-
```tsx
|
|
218
|
-
const customTheme = {
|
|
219
|
-
mode: 'light',
|
|
220
|
-
colors: {
|
|
221
|
-
primary: '#6366F1', // Indigo accent
|
|
222
|
-
selected: '#6366F1',
|
|
223
|
-
selectedText: '#FFFFFF',
|
|
224
|
-
background: '#FAFAFA',
|
|
225
|
-
rangeHighlight: '#E0E7FF',
|
|
226
|
-
},
|
|
227
|
-
borderRadius: {
|
|
228
|
-
lg: 20,
|
|
229
|
-
},
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
<CalendarPicker theme={customTheme} />
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
---
|
|
189
|
+
## Components
|
|
236
190
|
|
|
237
|
-
|
|
191
|
+
The package documentation describes the following components.
|
|
238
192
|
|
|
239
|
-
### 1. `DateTimePicker`
|
|
193
|
+
### 1. `DateTimePicker`
|
|
240
194
|
|
|
241
|
-
The
|
|
195
|
+
The unified picker. The documented modes are `date`, `time`, `datetime`, and `countdown`.
|
|
242
196
|
|
|
243
197
|
```tsx
|
|
244
198
|
<DateTimePicker
|
|
@@ -246,19 +200,21 @@ The core unified component supporting all modes (`date`, `time`, `datetime`, `co
|
|
|
246
200
|
presentation="bottom-sheet"
|
|
247
201
|
value={new Date()}
|
|
248
202
|
minuteInterval={5}
|
|
249
|
-
onConfirm={(date) =>
|
|
203
|
+
onConfirm={(date) => {
|
|
204
|
+
console.log('Confirmed:', date);
|
|
205
|
+
}}
|
|
206
|
+
onCancel={() => {
|
|
207
|
+
console.log('Cancelled');
|
|
208
|
+
}}
|
|
250
209
|
/>
|
|
251
210
|
```
|
|
252
211
|
|
|
253
212
|
### 2. `DatePicker`
|
|
254
213
|
|
|
255
|
-
|
|
214
|
+
A single-date picker. The supplied documentation also describes support for presets and a ref API.
|
|
256
215
|
|
|
257
216
|
```tsx
|
|
258
|
-
const pickerRef = useRef<DatePickerRef>(null);
|
|
259
|
-
|
|
260
217
|
<DatePicker
|
|
261
|
-
ref={pickerRef}
|
|
262
218
|
presentation="bottom-sheet"
|
|
263
219
|
value={selectedDate}
|
|
264
220
|
showPresets
|
|
@@ -268,20 +224,22 @@ const pickerRef = useRef<DatePickerRef>(null);
|
|
|
268
224
|
|
|
269
225
|
### 3. `TimePicker`
|
|
270
226
|
|
|
271
|
-
|
|
227
|
+
A time-focused picker with documented 12-hour/24-hour and minute-interval options.
|
|
272
228
|
|
|
273
229
|
```tsx
|
|
274
230
|
<TimePicker
|
|
275
231
|
presentation="modal"
|
|
276
232
|
is24Hour={false}
|
|
277
233
|
minuteInterval={15}
|
|
278
|
-
onConfirmTime={(time) =>
|
|
234
|
+
onConfirmTime={(time) => {
|
|
235
|
+
console.log('Selected time:', time);
|
|
236
|
+
}}
|
|
279
237
|
/>
|
|
280
238
|
```
|
|
281
239
|
|
|
282
240
|
### 4. `DateRangePicker`
|
|
283
241
|
|
|
284
|
-
|
|
242
|
+
Selects a start date and end date.
|
|
285
243
|
|
|
286
244
|
```tsx
|
|
287
245
|
<DateRangePicker
|
|
@@ -297,62 +255,66 @@ Select a start date and an end date with visual range highlighting and quick pre
|
|
|
297
255
|
|
|
298
256
|
### 5. `CalendarPicker`
|
|
299
257
|
|
|
300
|
-
|
|
258
|
+
A calendar component with documented marked-date and first-day-of-week options.
|
|
301
259
|
|
|
302
260
|
```tsx
|
|
303
261
|
<CalendarPicker
|
|
304
262
|
value={new Date()}
|
|
305
|
-
onChange={(
|
|
263
|
+
onChange={(date) => console.log('Selected:', date)}
|
|
306
264
|
markedDates={{
|
|
307
265
|
'2026-11-20': { marked: true, dotColor: '#EF4444' },
|
|
308
266
|
'2026-11-25': { marked: true, dotColor: '#10B981' },
|
|
309
267
|
}}
|
|
310
|
-
firstDayOfWeek={0}
|
|
268
|
+
firstDayOfWeek={0}
|
|
311
269
|
/>
|
|
312
270
|
```
|
|
313
271
|
|
|
272
|
+
`firstDayOfWeek` uses `0` for Sunday and `1` for Monday in the supplied documentation.
|
|
273
|
+
|
|
314
274
|
### 6. `MonthPicker`
|
|
315
275
|
|
|
316
|
-
|
|
276
|
+
A month-selection grid.
|
|
317
277
|
|
|
318
278
|
```tsx
|
|
319
279
|
<MonthPicker
|
|
320
280
|
value={{ year: 2026, month: 10 }}
|
|
321
281
|
onChange={({ year, month, date }) => {
|
|
322
|
-
console.log('Selected
|
|
282
|
+
console.log('Selected month:', month, 'year:', year);
|
|
323
283
|
}}
|
|
324
284
|
/>
|
|
325
285
|
```
|
|
326
286
|
|
|
327
287
|
### 7. `YearPicker`
|
|
328
288
|
|
|
329
|
-
|
|
289
|
+
A year-selection grid with optional bounds.
|
|
330
290
|
|
|
331
291
|
```tsx
|
|
332
292
|
<YearPicker
|
|
333
293
|
value={2026}
|
|
334
294
|
minYear={2000}
|
|
335
295
|
maxYear={2040}
|
|
336
|
-
onChange={(year) => console.log('
|
|
296
|
+
onChange={(year) => console.log('Selected year:', year)}
|
|
337
297
|
/>
|
|
338
298
|
```
|
|
339
299
|
|
|
340
300
|
### 8. `ClockPicker`
|
|
341
301
|
|
|
342
|
-
|
|
302
|
+
A clock-style time selector.
|
|
343
303
|
|
|
344
304
|
```tsx
|
|
345
305
|
<ClockPicker
|
|
346
306
|
value={{ hour: 10, minute: 30 }}
|
|
347
307
|
is24Hour={false}
|
|
348
308
|
minuteInterval={5}
|
|
349
|
-
onChange={({ hour, minute, date }) =>
|
|
309
|
+
onChange={({ hour, minute, date }) => {
|
|
310
|
+
console.log('Selected time:', hour, minute);
|
|
311
|
+
}}
|
|
350
312
|
/>
|
|
351
313
|
```
|
|
352
314
|
|
|
353
315
|
### 9. `WheelPicker`
|
|
354
316
|
|
|
355
|
-
|
|
317
|
+
A scroll-wheel selector for a list of custom options.
|
|
356
318
|
|
|
357
319
|
```tsx
|
|
358
320
|
<WheelPicker
|
|
@@ -362,13 +324,15 @@ Zero-dependency, smooth scroll wheel picker built on React Native's `ScrollView`
|
|
|
362
324
|
{ label: 'Evening (05:00 PM)', value: 'evening' },
|
|
363
325
|
]}
|
|
364
326
|
selectedValue="morning"
|
|
365
|
-
onChange={(
|
|
327
|
+
onChange={(value, index) => {
|
|
328
|
+
console.log('Selected:', value, 'at index:', index);
|
|
329
|
+
}}
|
|
366
330
|
/>
|
|
367
331
|
```
|
|
368
332
|
|
|
369
333
|
### 10. `TimeSlotPicker`
|
|
370
334
|
|
|
371
|
-
|
|
335
|
+
A time-slot grid with generated intervals and disabled slots.
|
|
372
336
|
|
|
373
337
|
```tsx
|
|
374
338
|
<TimeSlotPicker
|
|
@@ -376,122 +340,196 @@ Appointment time slot selection grid with auto-generation and disabled slot supp
|
|
|
376
340
|
endTime="17:00"
|
|
377
341
|
intervalMinutes={30}
|
|
378
342
|
disabledSlots={['12:00', '12:30']}
|
|
379
|
-
onSelectSlot={(slot) =>
|
|
343
|
+
onSelectSlot={(slot) => {
|
|
344
|
+
console.log('Selected slot:', slot.id);
|
|
345
|
+
}}
|
|
380
346
|
/>
|
|
381
347
|
```
|
|
382
348
|
|
|
383
|
-
|
|
349
|
+
## Themes
|
|
384
350
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
Generate standard presets for single dates and date ranges:
|
|
351
|
+
The supplied documentation describes three built-in theme modes:
|
|
388
352
|
|
|
389
353
|
```tsx
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
} from '@izonnet-web-solution/react-native-date-time-picker-kit';
|
|
394
|
-
|
|
395
|
-
// Built-in presets: Today, Yesterday, Last 7 Days, Last 30 Days, This Month, Next Month
|
|
396
|
-
const rangePresets = getStandardRangePresets();
|
|
354
|
+
<DateTimePicker theme="light" />
|
|
355
|
+
<DateTimePicker theme="dark" />
|
|
356
|
+
<DateTimePicker theme="auto" />
|
|
397
357
|
```
|
|
398
358
|
|
|
399
|
-
|
|
359
|
+
`auto` is documented as following the device's system appearance.
|
|
400
360
|
|
|
401
|
-
|
|
361
|
+
### Custom theme
|
|
402
362
|
|
|
403
|
-
|
|
363
|
+
The following is the custom-theme shape shown in the supplied README. Check the installed TypeScript definitions for the complete supported `ThemeConfig` shape.
|
|
404
364
|
|
|
405
365
|
```tsx
|
|
406
|
-
|
|
366
|
+
const customTheme = {
|
|
367
|
+
mode: 'light',
|
|
368
|
+
colors: {
|
|
369
|
+
primary: '#6366F1',
|
|
370
|
+
selected: '#6366F1',
|
|
371
|
+
selectedText: '#FFFFFF',
|
|
372
|
+
background: '#FAFAFA',
|
|
373
|
+
rangeHighlight: '#E0E7FF',
|
|
374
|
+
},
|
|
375
|
+
borderRadius: {
|
|
376
|
+
lg: 20,
|
|
377
|
+
},
|
|
378
|
+
};
|
|
407
379
|
|
|
408
|
-
|
|
409
|
-
startTime: '09:00',
|
|
410
|
-
endTime: '18:00',
|
|
411
|
-
intervalMinutes: 30,
|
|
412
|
-
disabledSlots: ['13:00', '13:30'], // Lunch break
|
|
413
|
-
is24Hour: false,
|
|
414
|
-
});
|
|
380
|
+
<CalendarPicker theme={customTheme} />
|
|
415
381
|
```
|
|
416
382
|
|
|
417
|
-
|
|
383
|
+
The supplied documentation also lists `themeColors`, `accentColor`, `textColor`, `backgroundColor`, and `styles` as customization options for applicable picker components.
|
|
384
|
+
|
|
385
|
+
## Localization and RTL
|
|
418
386
|
|
|
419
|
-
|
|
387
|
+
The supplied README lists these locale identifiers:
|
|
420
388
|
|
|
421
|
-
|
|
389
|
+
| Locale | Language |
|
|
390
|
+
|---|---|
|
|
391
|
+
| `en` | English |
|
|
392
|
+
| `hi` | Hindi |
|
|
393
|
+
| `gu` | Gujarati |
|
|
394
|
+
| `es` | Spanish |
|
|
395
|
+
| `fr` | French |
|
|
396
|
+
| `de` | German |
|
|
397
|
+
| `ar` | Arabic |
|
|
398
|
+
| `zh` | Chinese |
|
|
399
|
+
| `ja` | Japanese |
|
|
422
400
|
|
|
423
|
-
|
|
424
|
-
- `hi` (Hindi - हिन्दी)
|
|
425
|
-
- `gu` (Gujarati - ગુજરાતી)
|
|
426
|
-
- `es` (Spanish - Español)
|
|
427
|
-
- `fr` (French - Français)
|
|
428
|
-
- `de` (German - Deutsch)
|
|
429
|
-
- `ar` (Arabic - العربية with automatic RTL layout)
|
|
430
|
-
- `zh` (Chinese - 中文)
|
|
431
|
-
- `ja` (Japanese - 日本語)
|
|
401
|
+
Examples:
|
|
432
402
|
|
|
433
403
|
```tsx
|
|
434
404
|
<CalendarPicker locale="hi" />
|
|
435
405
|
<DateTimePicker locale="gu" />
|
|
436
|
-
<CalendarPicker locale="ar" />
|
|
406
|
+
<CalendarPicker locale="ar" />
|
|
437
407
|
```
|
|
438
408
|
|
|
439
|
-
|
|
409
|
+
Arabic is documented as supporting RTL layout behavior.
|
|
410
|
+
|
|
411
|
+
### Localized formatting
|
|
412
|
+
|
|
413
|
+
```tsx
|
|
414
|
+
import {
|
|
415
|
+
formatLocalized,
|
|
416
|
+
hiLocale,
|
|
417
|
+
} from '@izonnet-web-solution/react-native-date-time-picker-kit';
|
|
418
|
+
|
|
419
|
+
const formatted = formatLocalized(
|
|
420
|
+
new Date(),
|
|
421
|
+
'DD MMMM YYYY (dddd) A',
|
|
422
|
+
hiLocale
|
|
423
|
+
);
|
|
424
|
+
|
|
425
|
+
console.log(formatted);
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
The available locale objects and format tokens should be checked against the package's exported TypeScript declarations.
|
|
429
|
+
|
|
430
|
+
## Presets and time slots
|
|
431
|
+
|
|
432
|
+
### Standard date presets
|
|
433
|
+
|
|
434
|
+
```tsx
|
|
435
|
+
import {
|
|
436
|
+
getStandardRangePresets,
|
|
437
|
+
getStandardSinglePresets,
|
|
438
|
+
} from '@izonnet-web-solution/react-native-date-time-picker-kit';
|
|
439
|
+
|
|
440
|
+
const rangePresets = getStandardRangePresets();
|
|
441
|
+
const singleDatePresets = getStandardSinglePresets();
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
The supplied README lists common presets such as Today, Yesterday, Last 7 Days, Last 30 Days, This Month, and Next Month. Which presets are returned depends on the helper used.
|
|
445
|
+
|
|
446
|
+
### Generate appointment slots
|
|
440
447
|
|
|
441
448
|
```tsx
|
|
442
|
-
import {
|
|
449
|
+
import {
|
|
450
|
+
generateTimeSlots,
|
|
451
|
+
} from '@izonnet-web-solution/react-native-date-time-picker-kit';
|
|
443
452
|
|
|
444
|
-
const
|
|
445
|
-
|
|
453
|
+
const slots = generateTimeSlots({
|
|
454
|
+
startTime: '09:00',
|
|
455
|
+
endTime: '18:00',
|
|
456
|
+
intervalMinutes: 30,
|
|
457
|
+
disabledSlots: ['13:00', '13:30'],
|
|
458
|
+
is24Hour: false,
|
|
459
|
+
});
|
|
446
460
|
```
|
|
447
461
|
|
|
448
|
-
|
|
462
|
+
## Ref methods
|
|
463
|
+
|
|
464
|
+
The supplied documentation describes an imperative ref API for `DateTimePicker`-derived components. It lists these methods:
|
|
449
465
|
|
|
450
|
-
|
|
466
|
+
- `open()`
|
|
467
|
+
- `confirm()`
|
|
468
|
+
- `cancel()`
|
|
469
|
+
- `close()`
|
|
470
|
+
- `getValue()`
|
|
471
|
+
- `setValue(value)`
|
|
472
|
+
- `reset()`
|
|
451
473
|
|
|
452
|
-
|
|
474
|
+
Example:
|
|
453
475
|
|
|
454
476
|
```tsx
|
|
455
|
-
|
|
477
|
+
import React, { useRef } from 'react';
|
|
478
|
+
import {
|
|
479
|
+
DatePicker,
|
|
480
|
+
type DatePickerRef,
|
|
481
|
+
} from '@izonnet-web-solution/react-native-date-time-picker-kit';
|
|
456
482
|
|
|
457
|
-
|
|
458
|
-
|
|
483
|
+
export default function RefExample() {
|
|
484
|
+
const pickerRef = useRef<DatePickerRef>(null);
|
|
459
485
|
|
|
460
|
-
|
|
461
|
-
await pickerRef.current?.
|
|
462
|
-
|
|
463
|
-
await pickerRef.current?.close();
|
|
486
|
+
const openPicker = async () => {
|
|
487
|
+
await pickerRef.current?.open();
|
|
488
|
+
};
|
|
464
489
|
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
pickerRef
|
|
490
|
+
return (
|
|
491
|
+
<>
|
|
492
|
+
<Button title="Open picker" onPress={openPicker} />
|
|
493
|
+
<DatePicker ref={pickerRef} />
|
|
494
|
+
</>
|
|
495
|
+
);
|
|
496
|
+
}
|
|
469
497
|
```
|
|
470
498
|
|
|
471
|
-
|
|
499
|
+
> Confirm the exact ref type names and method signatures in the installed package declarations. The example above focuses on the documented API shape.
|
|
500
|
+
|
|
501
|
+
## `useDateTimePicker` hook
|
|
472
502
|
|
|
473
|
-
|
|
503
|
+
The supplied README describes a `useDateTimePicker` hook that returns a ref, an `open` function, and an `isOpen` state.
|
|
474
504
|
|
|
475
505
|
```tsx
|
|
476
|
-
import
|
|
506
|
+
import React from 'react';
|
|
507
|
+
import { View, Button } from 'react-native';
|
|
508
|
+
import {
|
|
509
|
+
DateTimePicker,
|
|
510
|
+
useDateTimePicker,
|
|
511
|
+
} from '@izonnet-web-solution/react-native-date-time-picker-kit';
|
|
477
512
|
|
|
478
|
-
function HookExample() {
|
|
513
|
+
export default function HookExample() {
|
|
479
514
|
const { ref, open, isOpen } = useDateTimePicker({
|
|
480
515
|
mode: 'date',
|
|
481
516
|
});
|
|
482
517
|
|
|
483
518
|
return (
|
|
484
519
|
<View>
|
|
485
|
-
<Button
|
|
520
|
+
<Button
|
|
521
|
+
title={isOpen ? 'Picker open' : 'Choose date'}
|
|
522
|
+
onPress={() => open()}
|
|
523
|
+
/>
|
|
486
524
|
<DateTimePicker ref={ref} mode="date" />
|
|
487
525
|
</View>
|
|
488
526
|
);
|
|
489
527
|
}
|
|
490
528
|
```
|
|
491
529
|
|
|
492
|
-
|
|
530
|
+
## Utilities
|
|
493
531
|
|
|
494
|
-
|
|
532
|
+
The supplied README lists the following date helpers:
|
|
495
533
|
|
|
496
534
|
```tsx
|
|
497
535
|
import {
|
|
@@ -503,151 +541,177 @@ import {
|
|
|
503
541
|
formatDate,
|
|
504
542
|
parseDate,
|
|
505
543
|
} from '@izonnet-web-solution/react-native-date-time-picker-kit';
|
|
544
|
+
```
|
|
506
545
|
|
|
507
|
-
|
|
508
|
-
validateDate(new Date()); // true
|
|
509
|
-
|
|
510
|
-
// Format using custom tokens
|
|
511
|
-
formatDate(new Date(), 'YYYY-MM-DD hh:mm A'); // "2026-11-19 10:30 AM"
|
|
546
|
+
Example usage:
|
|
512
547
|
|
|
513
|
-
|
|
514
|
-
|
|
548
|
+
```tsx
|
|
549
|
+
const valid = validateDate(new Date());
|
|
550
|
+
|
|
551
|
+
const formatted = formatDate(
|
|
552
|
+
new Date(),
|
|
553
|
+
'YYYY-MM-DD hh:mm A'
|
|
554
|
+
);
|
|
555
|
+
|
|
556
|
+
const disabled = isDateDisabled(
|
|
557
|
+
new Date(),
|
|
558
|
+
['2026-12-25'],
|
|
559
|
+
[0, 6]
|
|
560
|
+
);
|
|
515
561
|
```
|
|
516
562
|
|
|
517
|
-
|
|
563
|
+
The supplied documentation describes `isDateDisabled` as checking disabled dates and weekdays. Refer to the package's TypeScript declarations for exact parameter and return types for each utility.
|
|
518
564
|
|
|
519
|
-
## Error
|
|
565
|
+
## Error handling
|
|
520
566
|
|
|
521
|
-
The
|
|
567
|
+
The supplied README describes a typed `DateTimePickerError` and an `onError` callback.
|
|
522
568
|
|
|
523
569
|
```tsx
|
|
524
|
-
import {
|
|
570
|
+
import {
|
|
571
|
+
DateTimePicker,
|
|
572
|
+
DateTimePickerError,
|
|
573
|
+
} from '@izonnet-web-solution/react-native-date-time-picker-kit';
|
|
525
574
|
|
|
526
575
|
<DateTimePicker
|
|
527
576
|
onError={(error: DateTimePickerError) => {
|
|
528
577
|
console.error('Picker error code:', error.code);
|
|
529
578
|
console.error('Picker error message:', error.message);
|
|
530
579
|
}}
|
|
531
|
-
|
|
580
|
+
/>;
|
|
532
581
|
```
|
|
533
582
|
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
|
555
|
-
|
|
556
|
-
| `
|
|
557
|
-
| `
|
|
558
|
-
| `
|
|
559
|
-
| `
|
|
560
|
-
| `
|
|
561
|
-
| `
|
|
562
|
-
| `
|
|
563
|
-
| `minDate` | `Date \| number \| string` |
|
|
564
|
-
| `maximumDate` | `Date \| number \| string` |
|
|
565
|
-
| `
|
|
566
|
-
| `
|
|
567
|
-
| `
|
|
568
|
-
| `
|
|
569
|
-
| `
|
|
570
|
-
| `
|
|
571
|
-
| `
|
|
572
|
-
| `
|
|
573
|
-
| `
|
|
574
|
-
| `
|
|
575
|
-
| `
|
|
576
|
-
| `
|
|
577
|
-
| `
|
|
578
|
-
| `
|
|
579
|
-
| `
|
|
580
|
-
| `
|
|
581
|
-
| `
|
|
582
|
-
| `
|
|
583
|
-
| `
|
|
584
|
-
| `
|
|
585
|
-
| `
|
|
586
|
-
| `
|
|
587
|
-
| `
|
|
588
|
-
| `
|
|
589
|
-
| `
|
|
590
|
-
| `
|
|
591
|
-
| `
|
|
592
|
-
| `
|
|
593
|
-
| `
|
|
594
|
-
| `
|
|
595
|
-
| `
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
583
|
+
Documented error codes:
|
|
584
|
+
|
|
585
|
+
| Code | Meaning indicated by the code |
|
|
586
|
+
|---|---|
|
|
587
|
+
| `NATIVE_MODULE_NOT_FOUND` | Native module could not be found. |
|
|
588
|
+
| `PICKER_ALREADY_OPEN` | A picker is already open. |
|
|
589
|
+
| `PICKER_NOT_OPEN` | An operation requires an open picker. |
|
|
590
|
+
| `INVALID_DATE` | A supplied date is invalid. |
|
|
591
|
+
| `INVALID_MODE` | The requested mode is invalid. |
|
|
592
|
+
| `INVALID_MINUTE_INTERVAL` | The minute interval is invalid. |
|
|
593
|
+
| `DATE_OUT_OF_RANGE` | The selected date is outside the allowed range. |
|
|
594
|
+
| `UNSUPPORTED_FEATURE` | The requested feature is not supported. |
|
|
595
|
+
| `ACTIVITY_UNAVAILABLE` | The Android activity is unavailable. |
|
|
596
|
+
| `PRESENTATION_FAILED` | The picker presentation failed. |
|
|
597
|
+
| `UNKNOWN_ERROR` | An unclassified error occurred. |
|
|
598
|
+
|
|
599
|
+
## API reference
|
|
600
|
+
|
|
601
|
+
The table below consolidates the common props listed in the supplied README for `DateTimePicker` and related components. Not every prop necessarily applies to every specialized component. Use the TypeScript definitions shipped with your installed version as the authoritative reference.
|
|
602
|
+
|
|
603
|
+
| Prop | Documented type / values | Description |
|
|
604
|
+
|---|---|---|
|
|
605
|
+
| `mode` | `'date' \| 'time' \| 'datetime' \| 'countdown'` | Selection mode. |
|
|
606
|
+
| `value` | `Date \| number \| string \| null` | Controlled selected value. |
|
|
607
|
+
| `defaultValue` | `Date \| number \| string \| null` | Initial uncontrolled value. |
|
|
608
|
+
| `presentation` | `'native' \| 'inline' \| 'modal' \| 'bottom-sheet' \| 'fullscreen'` | Presentation style. |
|
|
609
|
+
| `display` | `'default' \| 'compact' \| 'inline' \| 'spinner' \| 'clock'` | Native picker display style. |
|
|
610
|
+
| `open` | `boolean` | Controls visibility in declarative presentations. |
|
|
611
|
+
| `isVisible` | `boolean` | Documented visibility alias. |
|
|
612
|
+
| `minimumDate` / `minDate` | `Date \| number \| string` | Lower date boundary. |
|
|
613
|
+
| `maximumDate` / `maxDate` | `Date \| number \| string` | Upper date boundary. |
|
|
614
|
+
| `minimumTime` | `string \| { hour: number; minute: number }` | Lower time boundary. |
|
|
615
|
+
| `maximumTime` | `string \| { hour: number; minute: number }` | Upper time boundary. |
|
|
616
|
+
| `minuteInterval` | `1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 10 \| 12 \| 15 \| 20 \| 30` | Minute stepping interval. |
|
|
617
|
+
| `locale` | `string \| PartialLocaleData` | Locale identifier or custom locale data. |
|
|
618
|
+
| `timeZone` | `string` | IANA timezone identifier. |
|
|
619
|
+
| `timeZoneOffsetInMinutes` | `number` | UTC offset in minutes. |
|
|
620
|
+
| `utcOffset` | `number` | Documented offset alias; README describes hours or minutes. |
|
|
621
|
+
| `is24Hour` | `boolean` | 12-hour or 24-hour time display. |
|
|
622
|
+
| `disabledDates` | `(Date \| string)[]` | Dates unavailable for selection. |
|
|
623
|
+
| `disabledWeekdays` | `number[]` | Weekdays unavailable for selection (`0` = Sunday). |
|
|
624
|
+
| `markedDates` | `MarkedDatesMap` | Calendar date markers. |
|
|
625
|
+
| `firstDayOfWeek` | `number` | First weekday in calendar layout. |
|
|
626
|
+
| `theme` | `'light' \| 'dark' \| 'auto' \| ThemeConfig` | Theme selection or custom theme. |
|
|
627
|
+
| `themeColors` | `ThemeColorsOverride` | Theme color overrides. |
|
|
628
|
+
| `styles` | Object | Styles for supported picker regions. |
|
|
629
|
+
| `title` | `string` | Picker/dialog title. |
|
|
630
|
+
| `confirmText` | `string` | Confirm button label. |
|
|
631
|
+
| `cancelText` | `string` | Cancel button label. |
|
|
632
|
+
| `accentColor` | `string` | Accent color. |
|
|
633
|
+
| `textColor` | `string` | Text color. |
|
|
634
|
+
| `backgroundColor` | `string` | Background color. |
|
|
635
|
+
| `showPresets` | `boolean` | Shows date presets where supported. |
|
|
636
|
+
| `customPresets` | `DatePreset[]` | Custom preset definitions. |
|
|
637
|
+
| `disabled` | `boolean` | Disables interaction. |
|
|
638
|
+
| `onChange` | `(event: { date: Date; mode: string }) => void` | Intermediate selection callback, as documented. |
|
|
639
|
+
| `onConfirm` | `(date: Date) => void` | Confirmed selection callback. |
|
|
640
|
+
| `onCancel` | `() => void` | Cancel callback. |
|
|
641
|
+
| `onDismiss` | `() => void` | Dismiss callback. |
|
|
642
|
+
| `onOpen` | `() => void` | Open callback. |
|
|
643
|
+
| `onError` | `(error: DateTimePickerError) => void` | Error callback. |
|
|
644
|
+
| `testID` | `string` | Testing identifier. |
|
|
645
|
+
|
|
646
|
+
### Component-specific callbacks
|
|
647
|
+
|
|
648
|
+
The supplied README also shows specialized callbacks:
|
|
649
|
+
|
|
650
|
+
- `DatePicker`: `onConfirmDate(date)`
|
|
651
|
+
- `TimePicker`: `onConfirmTime(time)`
|
|
652
|
+
- `DateRangePicker`: `onConfirmRange({ startDate, endDate })`
|
|
653
|
+
- `CalendarPicker`, `MonthPicker`, `YearPicker`, and `ClockPicker`: `onChange(...)`
|
|
654
|
+
- `WheelPicker`: `onChange(value, index)`
|
|
655
|
+
- `TimeSlotPicker`: `onSelectSlot(slot)`
|
|
656
|
+
|
|
657
|
+
These callback shapes are reproduced from the supplied documentation; verify them against the installed `.d.ts` files before relying on them in production.
|
|
658
|
+
|
|
659
|
+
## Compatibility
|
|
660
|
+
|
|
661
|
+
The supplied README contains this compatibility statement:
|
|
662
|
+
|
|
663
|
+
| Library version | React Native | iOS | Android | New Architecture |
|
|
664
|
+
|---|---|---|---|---|
|
|
665
|
+
| `1.0.x` | `0.74.0` – `0.88.x+` | iOS 15.1+ | API 24+ | Required |
|
|
666
|
+
|
|
667
|
+
**Important:** The original README also contains examples and package metadata that refer to different release stages. Keep this matrix synchronized with the actual npm release, `peerDependencies`, Codegen configuration, and tested CI versions before publishing. Do not advertise a React Native range that has not been tested.
|
|
668
|
+
|
|
669
|
+
## Troubleshooting
|
|
670
|
+
|
|
671
|
+
### Native module not found
|
|
672
|
+
|
|
673
|
+
1. Confirm the package is installed in the app that is being built.
|
|
674
|
+
2. Run `cd ios && pod install` for iOS.
|
|
675
|
+
3. Confirm the New Architecture requirement for your installed version.
|
|
676
|
+
4. Rebuild the native app; a Metro reload does not compile native code.
|
|
677
|
+
5. If the issue continues, clean the native build and rebuild.
|
|
678
|
+
|
|
679
|
+
### Changes do not appear after installation
|
|
680
|
+
|
|
681
|
+
Rebuild the iOS or Android application after installing or updating a native package. Restart Metro if needed.
|
|
682
|
+
|
|
683
|
+
### Expo project
|
|
684
|
+
|
|
685
|
+
Use an Expo development build or Prebuild workflow when native functionality is required. Standard Expo Go may not contain this package's native module.
|
|
607
686
|
|
|
608
687
|
## Contributing
|
|
609
688
|
|
|
610
|
-
|
|
689
|
+
Contributions, bug reports, and feature suggestions are welcome.
|
|
611
690
|
|
|
612
|
-
### Local
|
|
691
|
+
### Local development
|
|
613
692
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
2. **Install dependencies:**
|
|
621
|
-
```bash
|
|
622
|
-
npm install
|
|
623
|
-
```
|
|
624
|
-
|
|
625
|
-
3. **Run code quality checks & tests:**
|
|
626
|
-
```bash
|
|
627
|
-
# Run typechecks
|
|
628
|
-
npm run typecheck
|
|
629
|
-
|
|
630
|
-
# Run ESLint
|
|
631
|
-
npm run lint
|
|
632
|
-
|
|
633
|
-
# Run automated Jest test suite
|
|
634
|
-
npm test
|
|
635
|
-
```
|
|
693
|
+
```bash
|
|
694
|
+
git clone https://github.com/Izonnet-Web-Solution/react-native-date-time-picker-kit.git
|
|
695
|
+
cd react-native-date-time-picker-kit
|
|
696
|
+
npm install
|
|
697
|
+
```
|
|
636
698
|
|
|
637
|
-
|
|
638
|
-
```bash
|
|
639
|
-
npm run prepare
|
|
640
|
-
```
|
|
699
|
+
Run the checks documented by the project:
|
|
641
700
|
|
|
642
|
-
|
|
701
|
+
```bash
|
|
702
|
+
npm run typecheck
|
|
703
|
+
npm run lint
|
|
704
|
+
npm test
|
|
705
|
+
npm run prepare
|
|
706
|
+
```
|
|
643
707
|
|
|
644
|
-
|
|
645
|
-
2. Commit your changes with descriptive commit messages following Conventional Commits format (`feat:`, `fix:`, `docs:`, `test:`).
|
|
646
|
-
3. Ensure all 106+ unit tests pass and code passes `npm run lint` and `npm run typecheck`.
|
|
647
|
-
4. Open a Pull Request on GitHub with a clear explanation of your changes.
|
|
708
|
+
### Pull requests
|
|
648
709
|
|
|
649
|
-
|
|
710
|
+
1. Create a feature branch.
|
|
711
|
+
2. Use clear commit messages (for example, `feat:`, `fix:`, `docs:`, or `test:`).
|
|
712
|
+
3. Run the relevant tests, lint, and type checks.
|
|
713
|
+
4. Include a clear description and testing notes in the pull request.
|
|
650
714
|
|
|
651
715
|
## License
|
|
652
716
|
|
|
653
|
-
MIT
|
|
717
|
+
MIT. See the [MIT License](https://opensource.org/licenses/MIT).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@izonnet-web-solution/react-native-date-time-picker-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
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
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -190,4 +190,4 @@
|
|
|
190
190
|
],
|
|
191
191
|
"version": "0.64.0"
|
|
192
192
|
}
|
|
193
|
-
}
|
|
193
|
+
}
|