displayCalendar
The calendar dates are written in — the Hijri, the Persian — while the grid stays the same.
| Type | string | null |
|---|---|
| Default | the locale's calendar |
Live update (update()) | Yes |
| Declared in | packages/dom/src/calendar.ts |
What it does
Section titled “What it does”Give one of the platform’s calendars ('islamic-umalqura', 'persian',
'hebrew', 'buddhist'…): titles, day numbers and labels are written in it;
the data, the days and the grids stay Gregorian — an event on 21 October is
on 21 October, written 10 Jumada al-awwal. Left out — or null — the
locale’s own calendar (ar-SA has the Hijri one; engines differ there, so
write it); 'gregory' forces the Gregorian. A name the platform does not
know throws a RangeError.
Example
Section titled “Example”import { createCalendar } from '@dzcalendar/dom';
const calendar = createCalendar(element, { timeZone: 'Asia/Riyadh', locale: 'en-GB', initialView: 'dayGridMonth', displayCalendar: 'islamic-umalqura' });
// Later: the Gregorian (null would give the locale's own calendar back).calendar.update({ displayCalendar: 'gregory' });import { Component } from '@angular/core';import { DZ_CALENDAR } from '@dzcalendar/angular';
@Component({ selector: 'app-agenda', imports: [DZ_CALENDAR], template: `<dz-calendar timeZone="Europe/Paris" displayCalendar="islamic-umalqura" />`,})export class Agenda {}import { DzCalendar } from '@dzcalendar/react';
export function Agenda() { return <DzCalendar timeZone="Europe/Paris" displayCalendar="islamic-umalqura" />;}<script setup lang="ts">import { DzCalendar } from '@dzcalendar/vue';</script>
<template> <DzCalendar time-zone="Europe/Paris" display-calendar="islamic-umalqura" /></template>In the frameworks it is an Angular input (displayCalendar) and a React and Vue prop (displayCalendar, display-calendar).
Live demo
Section titled “Live demo”October 2026, its title and days written in the Hijri calendar.
See also
Section titled “See also”secondaryCalendar— a second calendar beside the dates.locale— the language.- Languages.