jalaali-date-time-picker 1.0.1 → 1.0.2

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 +29 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,14 +2,6 @@
2
2
 
3
3
  Production-ready Jalali (Persian) date + time picker for **React / Next.js**.
4
4
 
5
- [![npm version](https://img.shields.io/npm/v/jalaali-date-time-picker.svg)](https://www.npmjs.com/package/jalaali-date-time-picker)
6
- [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
- [![TailwindCSS](https://img.shields.io/badge/TailwindCSS-%5E3.0-38b2ac?logo=tailwindcss&logoColor=white)](https://tailwindcss.com)
8
- [![ShadCN](https://img.shields.io/badge/ShadCN-UI-purple?logo=react)](https://ui.shadcn.dev)
9
- [![TypeScript](https://img.shields.io/badge/TypeScript-%5E5.0-3178c6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
10
- [![Checked with Biome](https://img.shields.io/badge/Checked_with-Biome-60a5fa?style=flat&logo=biome)](https://biomejs.dev)
11
- ---
12
-
13
5
  - Fully typed
14
6
  - Tree-shakable ESM build
15
7
  - Built on Tailwind + ShadCN
@@ -83,6 +75,35 @@ export default function Page() {
83
75
 
84
76
  See the full interactive demo [here](https://alijeyrad.github.io/jalaali-date-time-picker/).
85
77
 
78
+ ---
79
+
80
+ ## Props
81
+
82
+ | Prop | Type | Default | Description |
83
+ |------------------|---------------------------------------------------|--------------------|-------------|
84
+ | `className` | `string` | `""` | Optional Tailwind class |
85
+ | `defaultValue` | `Date` | `new Date()` | Default initial date |
86
+ | `value` | `Date` | `undefined` | Controlled value |
87
+ | `minDate` | `Date` | `1970-01-01` | Minimum date allowed |
88
+ | `maxDate` | `Date` | `2100-12-31` | Maximum date allowed |
89
+ | `disablePast` | `boolean` | `false` | Disallow past dates |
90
+ | `disableFuture` | `boolean` | `false` | Disallow future dates |
91
+ | `minuteStep` | `number` | `1` | Step for minute selection |
92
+ | `disabled` | `boolean` | `false` | Disable the picker |
93
+ | `showTime` | `boolean` | `true` | Show time picker |
94
+ | `format` | `"jalali" \| "gregorian"` | `"jalali"` | Date format to display |
95
+ | `clearable` | `boolean` | `false` | Show "clear" button |
96
+ | `inline` | `boolean` | `false` | Render in-place instead of a modal |
97
+ | `trigger` | `ReactNode` | `undefined` | Custom trigger component |
98
+ | `formatLabel` | `(date: Date) => string` | `undefined` | Custom display label formatter |
99
+ | `onChange` | `(date: Date) => void` | `undefined` | Callback when value changes |
100
+ | `onOpenChange` | `(open: boolean) => void` | `undefined` | Callback when modal opens/closes |
101
+ | `onClear` | `(prev: Date \| null) => void` | `undefined` | Callback when cleared |
102
+ | `inputRef` | `React.RefObject<HTMLInputElement>` | `undefined` | Ref to hidden input |
103
+ | `placeholderLabel` | `string` | `"انتخاب تاریخ و زمان"` | Placeholder |
104
+ | `inputFieldProps` | `InputFieldProps` | `undefined` | Pass props from RHF, Formik, etc. |
105
+
106
+
86
107
  ---
87
108
 
88
109
  ## Goal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jalaali-date-time-picker",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "jalaali",