Skip to content

displayCalendar

The calendar dates are written in — the Hijri, the Persian — while the grid stays the same.

Typestring | null
Defaultthe locale's calendar
Live update (update())Yes
Declared inpackages/dom/src/calendar.ts

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.

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' });

In the frameworks it is an Angular input (displayCalendar) and a React and Vue prop (displayCalendar, display-calendar).

October 2026, its title and days written in the Hijri calendar.