API reference
Everything each entry point exports.
ngx-mat-hijri-adapter
The adapter, its provider, formatting, and calendar helpers.
| Export | Kind | Description |
|---|---|---|
HijriDateAdapter | class | Material DateAdapter for both calendars. |
provideHijriDateAdapter | function | Registers the adapter, formats, and locale. |
ProvideHijriDateAdapterOptions | type | Provider options, including formats. |
HIJRI_DATE_ADAPTER_OPTIONS | token | Adapter options: calendar, locale, timeZone. |
HijriDateAdapterOptions | type | The shape of the adapter options. |
HIJRI_DATE_FORMATS | constant | Default Material format slots. |
formatCalendarDate | function | Formats a date in its own calendar. |
CalendarCode | constant | The supported calendar names. |
SupportedCalendar | type | 'gregorian' or 'islamic-umalqura'. |
CalendarLocale | constant | The default locales, ar-SA and en-US. |
createCalendarDate | function | Creates a validated date. Months are 1-based. |
convertCalendarDate | function | Converts a date to another calendar. |
calendarOf | function | Reads the supported calendar. gregory becomes gregorian. |
compareCalendarDates | function | Orders two dates. |
addCalendarDate | function | Adds a duration, keeping the Umm al-Qura range. |
daysInCalendarMonth | function | Days in the month of a date. |
monthsInCalendarYear | function | Months in the year of a date. |
calendarToday | function | Today in a calendar and time zone. |
UMALQURA_MIN_YEAR | constant | 1300. |
UMALQURA_MAX_YEAR | constant | 1599. |
UmalquraDateRangeError | class | Thrown outside AH 1300–1599. |
InvalidCalendarDateError | class | Thrown for a day that does not exist. |
NGX_MAT_HIJRI_ADAPTER_VERSION | constant | The package version. |
ngx-mat-hijri-adapter/native
A DateAdapter<Date> that formats with Intl and counts Umm al-Qura days from an in-repo table.
| Export | Kind | Description |
|---|---|---|
NativeHijriDateAdapter | class | Material DateAdapter for a JavaScript Date at UTC noon. |
provideNativeHijriDateAdapter | function | Registers the native adapter, formats, and locale. |
ProvideNativeHijriDateAdapterOptions | type | Provider options, including formats. |
NativeHijriDateAdapterOptions | type | Calendar, locale, week start, and time zone. |
NATIVE_HIJRI_DATE_ADAPTER_OPTIONS | constant | Injection token for the native adapter options. |
ngx-mat-hijri-adapter/reactive
Fields for reactive forms.
| Export | Kind | Description |
|---|---|---|
ReactiveDateField | component | ngx-mat-reactive-date-field |
ReactiveDateRangeField | component | ngx-mat-reactive-date-range-field |
CalendarDateRange | type | The value of a range field. |
DateFieldLabels | type | Letter labels and accessible names. |
CalendarToggleController | type | Context of a #calendarToggle template. |
DateFieldPeriod | type | 'all', 'past', or 'future'. |
ngx-mat-hijri-adapter/signals
Fields for signal forms.
| Export | Kind | Description |
|---|---|---|
SignalDateField | component | ngx-mat-signal-date-field |
SignalDateRangeField | component | ngx-mat-signal-date-range-field |
CalendarDateRange | type | The value of a range field. |
DateFieldLabels | type | Letter labels and accessible names. |
CalendarToggleController | type | Context of a #calendarToggle template. |
DateFieldPeriod | type | 'all', 'past', or 'future'. |
Private: ngx-mat-hijri-adapter/internal
/reactive and /signals do not depend on each other. The code they share lives in ngx-mat-hijri-adapter/internal, which is not public API: its exports carry the ɵ prefix and may change in any release. Do not import from it.