Skip to content

resources

The resources events are booked on — a doctor, a room, a machine — drawn as columns by the resource views.

Typereadonly ResourceInput[]
Defaultnot set
Live update (update())Yes
Declared inpackages/core/src/kernel.ts

A resource is { id, title } and, optionally:

  • parentId: a tree (a department above its doctors); order: siblings by this number first.
  • timeZone and businessHours: its own hours, read in its own zone (a doctor in Riyadh on a calendar shown in Paris).
  • eventConstraint, eventOverlap: its own rules, over the calendar’s.
  • classNames, extendedProps, and any field of yours (to order or group by).

An event goes on a resource with resourceId (or several with resourceIds). The resource views — resourceTimeGridDay, resourceTimeGridWeek, resourceDayGridDay, resourceDayGridWeek, resourceDayGridMonth, and the Pro’s resourceTimeline… — draw a column (a row in the timeline) per resource; an event on two resources is in both. The other views ignore resources.

Bad input never throws: what cannot be read goes to onResourceProblems. update({ resources }) replaces the list; the same array again changes nothing.

import { createCalendar } from '@dzcalendar/dom';
const calendar = createCalendar(element, {
timeZone: 'Europe/Paris',
initialView: 'resourceTimeGridDay',
resources: [
{ id: 'benali', title: 'Dr Benali' },
{ id: 'haddad', title: 'Dr Haddad', timeZone: 'Asia/Riyadh', businessHours: { daysOfWeek: [7, 1, 2, 3, 4], start: '08:00', end: '12:00' } },
],
events: [{ id: 'a', title: 'Visit', start: '2026-10-21T09:00[Europe/Paris]', resourceId: 'benali' }],
onResourceProblems: (problems) => console.warn(problems),
});
// Later: another list.
calendar.update({ resources: [{ id: 'benali', title: 'Dr Benali' }] });

In the frameworks it is an input: Angular’s resources, React’s resources, Vue’s resources.

One column per resource; the visit to assign is on none, so not shown here.