Two calendars, one adapter
HijriDateAdapter runs in Umm al-Qura or Gregorian and switches at runtime with setCalendar().
One date adapter for the Umm al-Qura and Gregorian calendars, with ready-made fields for reactive and signal forms. Built on @internationalized/date.
Angular 22 · Material 3 · Signal forms
ng add ngx-mat-hijri-adapter@betaOr install it manually:
npm install ngx-mat-hijri-adapter@beta @internationalized/dateVersion 1.0.0-beta.1 is on npm under the beta tag. Stable 1.0.0 comes next.
| الأحد | الاثنين | الثلاثاء | الأربعاء | الخميس | الجمعة | السبت |
|---|---|---|---|---|---|---|
| جمادى ٢ | ||||||
٨ جمادى الآخرة، ١٤٤٨
18 November, 2026
Why this package
The name says Hijri, but every part handles the Gregorian calendar too. The default adapter stores CalendarDate objects, so no time zone shifts a day. Use ngx-mat-hijri-adapter/native when a form needs a JavaScript Date stored at UTC noon.
HijriDateAdapter runs in Umm al-Qura or Gregorian and switches at runtime with setCalendar().
An English Hijri picker or an Arabic Gregorian one. Locale sets digits, names, and week start only.
Ready-made date and range fields: ControlValueAccessor in /reactive, FormValueControl in /signals.
Users flip the displayed calendar while the form value stays in the calendar you chose.
Works with the CDK Dir directive, including the datepicker popup rendered in an overlay.
No Date.parse. Typed text is read in the adapter calendar, with Arabic-Indic and Persian digits.
Playground
Change the calendar, locale, and field options. The values and the code below update as you go.
Examples
Each example runs live. Switch to the code tabs for the component and template behind it.
ngx-mat-hijri-adapter/reactiveFor formControl and formControlName.Signal fieldsngx-mat-hijri-adapter/signalsFor the [formField] directive.A plain mat-datepicker with a range and a Friday filter.
ngx-mat-hijri-adapterThe same adapter in the Gregorian calendar.
ngx-mat-hijri-adapterThe alternative adapter. The form value is a Date at UTC noon, with the same range and Friday filter.
ngx-mat-hijri-adapter/nativeThe same native adapter in the Gregorian calendar.
ngx-mat-hijri-adapter/nativeDate and range fields with the calendar toggle.
ngx-mat-hijri-adapter/reactiveThe same fields bound with [formField].
ngx-mat-hijri-adapter/signals