Skip to content

initialDate

The date whose period the calendar shows first.

TypePlainDate
Defaulttoday, in timeZone
Live update (update())Yes, as date: update({ date: … })
Declared inpackages/core/src/kernel.ts

The calendar opens on the period that holds this date: its month, its week, its day. Left out, it is today in timeZone. Afterwards the person moves with the header’s arrows and “today”, and your code with update({ date }) or navigate('prev' | 'next' | 'today').

It is a Temporal.PlainDate — a date with no time and no zone, read as that day in the calendar’s zone. Await loadTemporal() before making one: on a browser without Temporal of its own, its polyfill arrives then.

import { Temporal, loadTemporal } from '@dzcalendar/core';
import { createCalendar } from '@dzcalendar/dom';
await loadTemporal();
const calendar = createCalendar(element, {
timeZone: 'Europe/Paris',
initialDate: Temporal.PlainDate.from('2026-10-25'),
});
// Later: another period.
calendar.update({ date: Temporal.PlainDate.from('2026-12-01') });

In the frameworks it is the component’s date: Angular’s [(date)], React’s defaultDate (or date with onDateChange, controlled), Vue’s v-model:date. Their Temporal.PlainDate.from(…) runs when the component does: on Safari, await loadTemporal() once at startup first (Angular’s provideDzCalendar() does it; React, Vue).

The calendar opens on the week of 25 October 2026 — Paris’s 25-hour day.