Skip to content

Hijri and Gregorian dates for Angular Material

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

bash
ng add ngx-mat-hijri-adapter@beta

Or install it manually:

bash
npm install ngx-mat-hijri-adapter@beta @internationalized/date

Version 1.0.0-beta.1 is on npm under the beta tag. Stable 1.0.0 comes next.

Live preview
جمادى ٢ ١٤٤٨
Comparison range Comparison range
الأحدالاثنينالثلاثاءالأربعاءالخميسالجمعةالسبت
جمادى ٢

٨ جمادى الآخرة، ١٤٤٨
18 November, 2026

Why this package

Built for both calendars from day one

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.

Two calendars, one adapter

HijriDateAdapter runs in Umm al-Qura or Gregorian and switches at runtime with setCalendar().

Locale is not the calendar

An English Hijri picker or an Arabic Gregorian one. Locale sets digits, names, and week start only.

Reactive and signal forms

Ready-made date and range fields: ControlValueAccessor in /reactive, FormValueControl in /signals.

Calendar toggle

Users flip the displayed calendar while the form value stays in the calendar you chose.

Right-to-left ready

Works with the CDK Dir directive, including the datepicker popup rendered in an overlay.

Strict parsing

No Date.parse. Typed text is read in the adapter calendar, with Arabic-Indic and Persian digits.

Playground

Try every option live

Change the calendar, locale, and field options. The values and the code below update as you go.

Examples

Copy, paste, ship

Each example runs live. Switch to the code tabs for the component and template behind it.

Reactive fieldsngx-mat-hijri-adapter/reactiveFor formControl and formControlName.Signal fieldsngx-mat-hijri-adapter/signalsFor the [formField] directive.

Umm al-Qura datepicker

A plain mat-datepicker with a range and a Friday filter.

ngx-mat-hijri-adapter

Gregorian datepicker

The same adapter in the Gregorian calendar.

ngx-mat-hijri-adapter

Native Umm al-Qura datepicker

The alternative adapter. The form value is a Date at UTC noon, with the same range and Friday filter.

ngx-mat-hijri-adapter/native

Native Gregorian datepicker

The same native adapter in the Gregorian calendar.

ngx-mat-hijri-adapter/native

Reactive form fields

Date and range fields with the calendar toggle.

ngx-mat-hijri-adapter/reactive

Signal form fields

The same fields bound with [formField].

ngx-mat-hijri-adapter/signals