ng-jalali-datepicker
v1.0.6
Published
A standalone Angular component for selecting **Jalali (Persian)** dates and times. Fully customizable, uses `dayjs` with Jalali calendar support, and supports both calendar and time modes.
Downloads
21
Readme
ng-jalali-datepicker
A standalone Angular component for selecting Jalali (Persian) dates and times. Fully customizable, uses dayjs with Jalali calendar support, and supports both calendar and time modes.
📦 Installation
npm install ng-jalali-datepicker dayjs jalali-plugin-dayjs🔧 Usage
Standalone Component (Angular 14+)
import { NgJalaliDatepickerComponent } from 'ng-jalali-datepicker';<ng-jalali-datepicker [(ngModel)]="myDate" mode="calendar-time" [darkMode]="true"></ng-jalali-datepicker>Inputs
| Input | Type | Default | Description |
|------------|-----------------------------------|-------------|--------------------------------------|
| mode | 'calendar' \| 'time' \| 'calendar-time' | 'calendar' | Controls calendar/time display |
| darkMode | boolean | false | Enables dark styling if true |
🧠 Features
- Jalali calendar via
dayjs+jalali-plugin-dayjs - Angular
ControlValueAccessorsupport (ngModel, Reactive Forms) - Fully standalone and tree-shakable
- Simple styling, easily overrideable
📝 License
MIT
