Skip to content

Installation

DzCalendar is a set of small packages. The kernel (@dzcalendar/core) knows the events, the views and the clock; it has no DOM. The renderer (@dzcalendar/dom) draws it. The framework packages wrap the renderer, and an optional stylesheet (@dzcalendar/theme) gives it its look.

Terminal window
npm install @dzcalendar/core @dzcalendar/dom @dzcalendar/theme
Package What it brings
@dzcalendar/core The kernel: events, recurrence, sources, commands and undo, views as data. Re-exports Temporal.
@dzcalendar/dom createCalendar: month, week, day views; @dzcalendar/dom/list and @dzcalendar/dom/multimonth add the list and year views.
@dzcalendar/theme dzcalendar.css: seven colour families, light and dark, checked for WCAG AA contrast.
@dzcalendar/angular <dz-calendar> for Angular 19 to 22, zoneless or zone.js, signals.
@dzcalendar/react <DzCalendar> for React 18 and 19.
@dzcalendar/vue <DzCalendar> for Vue 3.4 and 3.5.
@dzcalendar/element <dz-calendar> as a Web Component, for any page.
@dzcalendar/ical iCalendar sources.
@dzcalendar/pro Timeline views, the event editor, printing and exports.

Temporal comes with the kernel: import { Temporal } from '@dzcalendar/core'. Where the browser does not have it yet, a polyfill stands in.

Import it once, anywhere in your application:

import '@dzcalendar/theme/dzcalendar.css';

Without it the calendar still works, in the system’s colours. With it, three options choose the look, and all three can change live with update():

  • theme: 'standard' (the default), 'slate', 'night', 'pastel', 'frost', 'solar', 'contrast', or one of yours made with defineTheme.
  • scheme: 'auto' (follows the system), 'light' or 'dark'.
  • density: 'compact', 'comfortable' (the default) or 'spacious' — 48, 72 or 96 pixels an hour.

All of the calendar’s CSS sits in two cascade layers, so any rule of yours outside a layer wins over it, whatever its specificity. Next to Tailwind, Bootstrap or a global reset, see Theming & CSS.

The same calendar in the four flavours: a week in Paris, four events, one of them in Chicago’s time zone and one repeating every Monday and Wednesday.

import '@dzcalendar/theme/dzcalendar.css';
import { Temporal, loadTemporal } from '@dzcalendar/core';
import { createCalendar } from '@dzcalendar/dom';
import '@dzcalendar/core/recurrence'; // repeating events (rrule)
// At once where the browser has Temporal (Chrome, Edge, Firefox); Safari fetches its polyfill first.
await loadTemporal();
createCalendar(document.getElementById('agenda')!, {
timeZone: 'Europe/Paris',
initialView: 'timeGridWeek',
initialDate: Temporal.PlainDate.from('2026-10-21'),
editable: true,
events: [
{ id: 'a', title: 'Consultation', start: '2026-10-21T09:00[Europe/Paris]', duration: { minutes: 45 } },
{ id: 'b', title: 'Call Chicago', start: '2026-10-22T10:00[America/Chicago]', duration: { hours: 1 } },
{ id: 'c', title: 'Day off', start: '2026-10-23', allDay: true },
{ id: 'w', title: 'Rounds', start: '2026-10-19T08:00[Europe/Paris]', duration: { hours: 2 }, rrule: 'FREQ=WEEKLY;BYDAY=MO,WE' },
],
});

See it running on the Vanilla JavaScript page, then the page for your framework: Angular, React, Vue.

  • Browsers: Chrome 99, Firefox 97, Safari / iOS 15.4 and later (cascade layers). Where color-mix() is missing (Safari before 16.2), tints fall back to the raised background.
  • No server rendering of the calendar itself: importing the packages touches no document or window, and the calendar is made in the browser.