@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.
Files changed (2) hide show
  1. package/README.md +429 -365
  2. 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 complete, ultra-lightweight, customizable React Native Date & Time Picker library powered by **iOS (Swift + UIKit)** and **Android (Kotlin + Android SDK)** native TurboModules, plus a rich suite of pure React Native calendar and modal components.
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
  [![npm version](https://img.shields.io/npm/v/@izonnet-web-solution/react-native-date-time-picker-kit.svg)](https://www.npmjs.com/package/@izonnet-web-solution/react-native-date-time-picker-kit)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
- [![Build Status](https://img.shields.io/badge/tests-106%20passed-brightgreen.svg)]()
8
- [![TypeScript](https://img.shields.io/badge/TypeScript-Strict-blue.svg)]()
9
- [![Zero Dependencies](https://img.shields.io/badge/dependencies-0-success.svg)]()
10
-
11
- ---
12
-
13
- ## Screenshots & Previews
14
-
15
- <div align="center">
16
-
17
- | iOS Native UIDatePicker | Android Native DatePickerDialog | iOS DateTime Dual Mode |
18
- | :---: | :---: | :---: |
19
- | <img src="https://raw.githubusercontent.com/Izonnet-Web-Solution/react-native-date-time-picker-kit/main/docs/assets/ios_native_datepicker.png" width="260" alt="iOS Native DatePicker" /> | <img src="https://raw.githubusercontent.com/Izonnet-Web-Solution/react-native-date-time-picker-kit/main/docs/assets/android_native_datepicker.png" width="260" alt="Android Native DatePicker" /> | <img src="https://raw.githubusercontent.com/Izonnet-Web-Solution/react-native-date-time-picker-kit/main/docs/assets/ios_datetime_picker.png" width="260" alt="iOS DateTime Picker" /> |
20
-
21
- | iOS Countdown Wheels | Components & Theming Overview |
22
- | :---: | :---: |
23
- | <img src="https://raw.githubusercontent.com/Izonnet-Web-Solution/react-native-date-time-picker-kit/main/docs/assets/ios_countdown_picker.png" width="260" alt="iOS Countdown Picker" /> | <img src="https://raw.githubusercontent.com/Izonnet-Web-Solution/react-native-date-time-picker-kit/main/docs/assets/ios_components_overview.png" width="260" alt="Components & Theming Overview" /> |
24
-
25
- </div>
26
-
27
- ---
28
-
29
- ## Table of Contents
30
-
31
- 1. [Screenshots & Previews](#screenshots--previews)
32
- 2. [Features](#features)
33
- 3. [Platform Support & Architecture](#platform-support--architecture)
34
- 4. [Zero Dependency Policy](#zero-dependency-policy)
35
- 5. [Installation & Setup](#installation--setup)
36
- - [iOS Setup](#ios-setup)
37
- - [Android Setup](#android-setup)
38
- 6. [Quick Start](#quick-start)
39
- 7. [Presentation Modes](#presentation-modes)
40
- 8. [Theme System](#theme-system)
41
- 9. [Component Catalog](#component-catalog)
42
- - [1. `DateTimePicker`](#1-datetimepicker-unified)
43
- - [2. `DatePicker`](#2-datepicker)
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
+ [![TypeScript](https://img.shields.io/badge/TypeScript-Strict-blue.svg)](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
- - **True Native UI**: Native **Swift** (`UIDatePicker`) on iOS and **Kotlin** (`DatePickerDialog`, `TimePickerDialog`) on Android.
69
- - **Zero Third-Party Runtime Dependencies**: No Moment.js, Day.js, date-fns, react-native-modal, or community picker wrappers.
70
- - **TurboModule Architecture**: Typed React Native Codegen specifications with promise-based async operations and UI thread safety.
71
- - **5 Presentation Modes**:
72
- - `native`: Platform-native dialogs and sheet modals via TurboModules.
73
- - `inline`: In-tree custom calendar/clock embedded directly in view hierarchy.
74
- - `bottom-sheet`: Animated slide-up bottom sheet with grab handle and backdrop dimming.
75
- - `modal`: Centered dialog with backdrop blur/dim.
76
- - `fullscreen`: Fullscreen overlay modal.
77
- - **Theme Engine**: Light mode, Dark mode, Automatic system detection, and custom `ThemeConfig` (colors, typography, spacing, border radii).
78
- - **10 Specialized Components**: `DateTimePicker`, `DatePicker`, `TimePicker`, `DateRangePicker`, `CalendarPicker`, `MonthPicker`, `YearPicker`, `ClockPicker`, `WheelPicker`, `TimeSlotPicker`.
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
- ## Platform Support & Architecture
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
- | Platform | Native Technology | Architecture | Minimum Version |
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
- ### React Native New Architecture & Expo Compatibility
67
+ The supplied documentation describes the native module as using React Native Codegen and TurboModules.
93
68
 
94
- - **React Native New Architecture (Fabric & TurboModules):** Fully supported natively with typed Codegen specifications on React Native 0.74 – 0.88+.
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
- ## Zero Dependency Policy
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
- This library maintains **0 runtime dependencies**.
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
- ## Installation & Setup
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
- # yarn
87
+ ```bash
116
88
  yarn add @izonnet-web-solution/react-native-date-time-picker-kit
89
+ ```
90
+
91
+ Or pnpm:
117
92
 
118
- # pnpm
93
+ ```bash
119
94
  pnpm add @izonnet-web-solution/react-native-date-time-picker-kit
120
95
  ```
121
96
 
122
- ### iOS Setup
97
+ ### iOS
123
98
 
124
99
  Install CocoaPods dependencies:
125
100
 
126
101
  ```bash
127
- cd ios && pod install
102
+ cd ios
103
+ pod install
104
+ cd ..
128
105
  ```
129
106
 
130
- The podspec automatically configures the Swift TurboModule (`DateTimePickerKitImpl`) and module headers.
107
+ Then rebuild the iOS app.
131
108
 
132
- ### Android Setup
109
+ ### Android
133
110
 
134
- In your React Native project, ensure New Architecture is enabled (standard in RN 0.76+):
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 Start
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, Button, Text } from 'react-native';
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 BasicExample() {
154
- const [date, setDate] = useState(new Date());
155
- const [show, setShow] = useState(false);
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>Selected: {formatDate(date, 'YYYY-MM-DD')}</Text>
160
- <Button title="Choose Date" onPress={() => setShow(true)} />
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
- {show && (
148
+ {isPickerVisible && (
163
149
  <DateTimePicker
164
150
  mode="date"
165
151
  presentation="native"
166
- value={date}
167
- onConfirm={(selectedDate) => {
168
- setShow(false);
169
- setDate(selectedDate);
152
+ value={selectedDate}
153
+ onConfirm={(date) => {
154
+ setSelectedDate(date);
155
+ setPickerVisible(false);
170
156
  }}
171
- onCancel={() => setShow(false)}
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
- ## Presentation Modes
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
- | `'native'` *(default)* | Native OS dialogs/sheets (`UIDatePicker` on iOS, `DatePickerDialog` on Android). |
188
- | `'bottom-sheet'` | Slide-up bottom sheet with grab handle, backdrop dimming, and header. |
189
- | `'modal'` | Center-aligned modal dialog. |
190
- | `'inline'` | Directly rendered into the parent view tree without any modal overlay. |
191
- | `'fullscreen'` | Fullscreen modal overlay with safe area padding. |
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" // or "inline", "modal", "native"
181
+ presentation="bottom-sheet"
196
182
  value={new Date()}
197
- onConfirmDate={(d) => console.log(d)}
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
- ## Component Catalog
191
+ The package documentation describes the following components.
238
192
 
239
- ### 1. `DateTimePicker` (Unified)
193
+ ### 1. `DateTimePicker`
240
194
 
241
- The core unified component supporting all modes (`date`, `time`, `datetime`, `countdown`) and presentations.
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) => console.log('Confirmed:', 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
- Dedicated single date picker component with optional presets.
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
- Dedicated time picker component supporting 12h / 24h formats and minute intervals.
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) => console.log(time)}
234
+ onConfirmTime={(time) => {
235
+ console.log('Selected time:', time);
236
+ }}
279
237
  />
280
238
  ```
281
239
 
282
240
  ### 4. `DateRangePicker`
283
241
 
284
- Select a start date and an end date with visual range highlighting and quick presets.
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
- Full-featured inline or standalone calendar component with marked dates and RTL support.
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={(d) => console.log(d)}
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} // 0 = Sunday, 1 = Monday
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
- 3x4 month selection grid with decade navigation.
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 Month:', month, 'Year:', year);
282
+ console.log('Selected month:', month, 'year:', year);
323
283
  }}
324
284
  />
325
285
  ```
326
286
 
327
287
  ### 7. `YearPicker`
328
288
 
329
- Decade-paginated year selection grid.
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('Year:', year)}
296
+ onChange={(year) => console.log('Selected year:', year)}
337
297
  />
338
298
  ```
339
299
 
340
300
  ### 8. `ClockPicker`
341
301
 
342
- Interactive 12-hour / 24-hour digital clock picker with segmented hour/minute controls and AM/PM toggles.
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 }) => console.log(hour, minute)}
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
- Zero-dependency, smooth scroll wheel picker built on React Native's `ScrollView`.
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={(val, index) => console.log(val)}
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
- Appointment time slot selection grid with auto-generation and disabled slot support.
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) => console.log('Booked slot:', slot.id)}
343
+ onSelectSlot={(slot) => {
344
+ console.log('Selected slot:', slot.id);
345
+ }}
380
346
  />
381
347
  ```
382
348
 
383
- ---
349
+ ## Themes
384
350
 
385
- ## Quick Date Presets
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
- import {
391
- getStandardRangePresets,
392
- getStandardSinglePresets,
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
- ## Appointment Time Slots
361
+ ### Custom theme
402
362
 
403
- Generate slots for scheduling workflows:
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
- import { generateTimeSlots } from '@izonnet-web-solution/react-native-date-time-picker-kit';
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
- const slots = generateTimeSlots({
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
- ## Localization & RTL
387
+ The supplied README lists these locale identifiers:
420
388
 
421
- ### Built-in Locales
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
- - `en` (English - default)
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" /> // Flips weekday order and navigation arrows for RTL
406
+ <CalendarPicker locale="ar" />
437
407
  ```
438
408
 
439
- ### Formatted Localized Output
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 { formatLocalized, hiLocale } from '@izonnet-web-solution/react-native-date-time-picker-kit';
449
+ import {
450
+ generateTimeSlots,
451
+ } from '@izonnet-web-solution/react-native-date-time-picker-kit';
443
452
 
444
- const str = formatLocalized(new Date(), 'DD MMMM YYYY (dddd) A', hiLocale);
445
- // Output: "19 नवंबर 2026 (गुरुवार) पूर्वाह्न"
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
- ## Imperative Ref APIs
466
+ - `open()`
467
+ - `confirm()`
468
+ - `cancel()`
469
+ - `close()`
470
+ - `getValue()`
471
+ - `setValue(value)`
472
+ - `reset()`
451
473
 
452
- Control pickers programmatically via React refs:
474
+ Example:
453
475
 
454
476
  ```tsx
455
- const pickerRef = useRef<DateTimePickerRef>(null);
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
- // Open picker
458
- await pickerRef.current?.open();
483
+ export default function RefExample() {
484
+ const pickerRef = useRef<DatePickerRef>(null);
459
485
 
460
- // Programmatic confirm / cancel / close
461
- await pickerRef.current?.confirm();
462
- await pickerRef.current?.cancel();
463
- await pickerRef.current?.close();
486
+ const openPicker = async () => {
487
+ await pickerRef.current?.open();
488
+ };
464
489
 
465
- // Value access
466
- const value = pickerRef.current?.getValue();
467
- pickerRef.current?.setValue(new Date());
468
- pickerRef.current?.reset();
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
- ## Custom Hook (`useDateTimePicker`)
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 { useDateTimePicker } from '@izonnet-web-solution/react-native-date-time-picker-kit';
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 title={isOpen ? 'Open' : 'Choose'} onPress={() => open()} />
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
- ## Date Validation & Conversion Utilities
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
- // Check date validity
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
- // Check disabled dates
514
- isDateDisabled(new Date(), ['2026-12-25'], [0, 6]); // true if Dec 25 or Weekend
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 Handling & Error Codes
565
+ ## Error handling
520
566
 
521
- The library exposes strongly typed `DateTimePickerError` instances:
567
+ The supplied README describes a typed `DateTimePickerError` and an `onError` callback.
522
568
 
523
569
  ```tsx
524
- import { DateTimePickerError, type DateTimePickerErrorCode } from '@izonnet-web-solution/react-native-date-time-picker-kit';
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
- Available error codes:
535
- - `NATIVE_MODULE_NOT_FOUND`
536
- - `PICKER_ALREADY_OPEN`
537
- - `PICKER_NOT_OPEN`
538
- - `INVALID_DATE`
539
- - `INVALID_MODE`
540
- - `INVALID_MINUTE_INTERVAL`
541
- - `DATE_OUT_OF_RANGE`
542
- - `UNSUPPORTED_FEATURE`
543
- - `ACTIVITY_UNAVAILABLE`
544
- - `PRESENTATION_FAILED`
545
- - `UNKNOWN_ERROR`
546
-
547
- ---
548
-
549
- ## Props Reference Table
550
-
551
- Complete reference for `<DateTimePicker />` and derived pickers (`DatePicker`, `TimePicker`, `DateRangePicker`, etc.):
552
-
553
- | Prop | Type | Default | Required | Description |
554
- | :--- | :--- | :--- | :--- | :--- |
555
- | `mode` | `'date' \| 'time' \| 'datetime' \| 'countdown'` | `'date'` | No | Selection mode for the picker. |
556
- | `value` | `Date \| number \| string \| null` | `null` | No | Controlled date value. Accepts a `Date` object, millisecond epoch number, or ISO string. |
557
- | `defaultValue` | `Date \| number \| string \| null` | `null` | No | Uncontrolled initial date value. |
558
- | `presentation` | `'native' \| 'inline' \| 'modal' \| 'bottom-sheet' \| 'fullscreen'` | `'native'` | No | Display presentation container. Native launches OS modal; others render pure in-tree UI. |
559
- | `display` | `'default' \| 'compact' \| 'inline' \| 'spinner' \| 'clock'` | `'default'` | No | Visual style for native pickers on iOS and Android. |
560
- | `open` | `boolean` | `false` | No | Controls modal visibility in declarative presentation modes. |
561
- | `isVisible` | `boolean` | `false` | No | Convenience alias for `open` or `visible`. |
562
- | `minimumDate` | `Date \| number \| string` | `undefined` | No | Lower date/time boundary. Clamps selection and disables dates prior to this value. |
563
- | `minDate` | `Date \| number \| string` | `undefined` | No | Convenience alias for `minimumDate`. |
564
- | `maximumDate` | `Date \| number \| string` | `undefined` | No | Upper date/time boundary. Clamps selection and disables dates after this value. |
565
- | `maxDate` | `Date \| number \| string` | `undefined` | No | Convenience alias for `maximumDate`. |
566
- | `minimumTime` | `string \| { hour: number; minute: number }` | `undefined` | No | Minimum allowable time boundary (e.g. `"09:00"` or `{ hour: 9, minute: 0 }`). |
567
- | `maximumTime` | `string \| { hour: number; minute: number }` | `undefined` | No | Maximum allowable time boundary (e.g. `"17:00"` or `{ hour: 17, minute: 0 }`). |
568
- | `minuteInterval` | `1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 10 \| 12 \| 15 \| 20 \| 30` | `1` | No | Interval stepping for minute wheel or clock. |
569
- | `locale` | `string \| PartialLocaleData` | Device locale | No | BCP 47 locale tag (`'en'`, `'es'`, `'fr'`, `'hi'`, `'ja'`, etc.) or custom locale dictionary. |
570
- | `timeZone` | `string` | Device TZ | No | Target IANA timezone identifier (e.g., `'America/New_York'`, `'Asia/Kolkata'`). |
571
- | `timeZoneOffsetInMinutes`| `number` | `undefined` | No | Target UTC offset in minutes (e.g. `330` for IST `+05:30`). |
572
- | `utcOffset` | `number` | `undefined` | No | Convenience alias for `timeZoneOffsetInMinutes` (accepts hours e.g. `5.5` or minutes `330`). |
573
- | `is24Hour` | `boolean` | Locale default | No | Explicit override for 24-hour time formatting instead of 12-hour AM/PM. |
574
- | `disabledDates` | `(Date \| string)[]` | `[]` | No | Array of dates or ISO strings to disable from selection. |
575
- | `disabledWeekdays` | `number[]` | `[]` | No | Array of weekday indices to disable (0 = Sunday, 1 = Monday, ..., 6 = Saturday). |
576
- | `markedDates` | `MarkedDatesMap` | `{}` | No | Mapping of date keys (`YYYY-MM-DD`) with colored dots, badges, or custom highlights. |
577
- | `firstDayOfWeek` | `number` | `0` (Sun) | No | First day of the week in calendar grids (0 = Sunday, 1 = Monday, 6 = Saturday). |
578
- | `theme` | `'light' \| 'dark' \| 'auto' \| ThemeConfig` | `'auto'` | No | Visual theme mode or complete customized ThemeConfig design tokens. |
579
- | `themeColors` | `ThemeColorsOverride` | `undefined` | No | Clean palette overrides (`backgroundColor`, `textColor`, `accentColor`, `dividerColor`). |
580
- | `styles` | `{ headerStyle?, confirmButtonStyle?, cancelButtonStyle?, containerStyle? }` | `undefined` | No | Style overrides for modal container, header, and action buttons. |
581
- | `title` | `string` | Mode title | No | Modal header or native dialog title. |
582
- | `confirmText` | `string` | `'Confirm'` | No | Text label for the confirmation button. |
583
- | `cancelText` | `string` | `'Cancel'` | No | Text label for the cancellation button. |
584
- | `accentColor` | `string` | Theme primary | No | Accent color for active selections, highlights, and buttons. |
585
- | `textColor` | `string` | Theme text | No | Base text color. |
586
- | `backgroundColor` | `string` | Theme surface | No | Modal and component background color. |
587
- | `showPresets` | `boolean` | `false` | No | Whether to show quick date presets bar (Today, Yesterday, Last 7 Days, This Month). |
588
- | `customPresets` | `DatePreset[]` | `undefined` | No | Custom array of date presets to render. |
589
- | `disabled` | `boolean` | `false` | No | When true, disables user interaction with the picker. |
590
- | `onChange` | `(event: { date: Date; mode: string }) => void` | `undefined` | No | Callback invoked on intermediate date or time selection changes. |
591
- | `onConfirm` | `(date: Date) => void` | `undefined` | No | Callback invoked when user confirms selection with the finalized `Date`. |
592
- | `onCancel` | `() => void` | `undefined` | No | Callback invoked when user cancels or dismisses picker. |
593
- | `onDismiss` | `() => void` | `undefined` | No | Callback invoked when native dialog is dismissed. |
594
- | `onOpen` | `() => void` | `undefined` | No | Callback invoked when picker modal opens. |
595
- | `onError` | `(error: DateTimePickerError) => void` | `undefined` | No | Callback invoked if an error occurs during presentation or date calculation. |
596
- | `testID` | `string` | `undefined` | No | Identifier for end-to-end automated testing. |
597
-
598
- ---
599
-
600
- ## Compatibility Matrix
601
-
602
- | Library Version | React Native | iOS | Android | New Architecture |
603
- | :--- | :--- | :--- | :--- | :--- |
604
- | `1.0.x` | `0.74.0` – `0.88.x+` | iOS 15.1+ | API 24+ (Android 7.0+) | **Yes (Required)** |
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
- We welcome community contributions, bug reports, and feature suggestions!
689
+ Contributions, bug reports, and feature suggestions are welcome.
611
690
 
612
- ### Local Development Setup
691
+ ### Local development
613
692
 
614
- 1. **Clone the repository:**
615
- ```bash
616
- git clone https://github.com/Izonnet-Web-Solution/react-native-date-time-picker-kit.git
617
- cd react-native-date-time-picker-kit
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
- 4. **Build distribution binaries:**
638
- ```bash
639
- npm run prepare
640
- ```
699
+ Run the checks documented by the project:
641
700
 
642
- ### Submitting Pull Requests
701
+ ```bash
702
+ npm run typecheck
703
+ npm run lint
704
+ npm test
705
+ npm run prepare
706
+ ```
643
707
 
644
- 1. Fork the repo and create your feature branch: `git checkout -b feat/my-new-feature`.
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 © [Izonnet Web Solution](https://github.com/izonnet-web-solution)
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.2",
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
+ }