The resources property (array) specifies resources that will be displayed as rows in the JavaScript Scheduler.

Declaration

DayPilot.Scheduler.resources

Resource Structure

Each item in the resources array defines one Scheduler row or row group.

Required properties:

  • id (string | number) specifies the resource ID. The row will display all events where the resource value matches this ID.

  • name (string) specifies the resource name displayed in the default row header column.

Optional properties:

  • areas (array) specifies an array of active areas.

  • backColor (string) specifies the background color in CSS format.

  • bubbleHtml (string) specifies static bubble HTML.

  • fontColor (string) specifies the foreground color in CSS format.

  • cellsAutoUpdated (boolean) refreshes cells in this row after every change (see also JavaScript Scheduler: Displaying Group Availability).

  • cellsDisabled (boolean) disables all cells in this row.

  • children (array) specifies nested child resources. Set treeEnabled to true to display them in a tree. Supported in Lite from version 2026.4.899 and in Pro.

  • columns (array) specifies an array of row header columns. Items support html, cssClass, and backColor properties. This field is only applicable when rowHeaderColumnsMode is set to "Legacy".

  • cssClass (string) specifies a custom CSS class.

  • contextMenu (string | DayPilot.Menu) specifies a custom context menu.

  • dynamicChildren (boolean; Pro only) loads children dynamically when the row is expanded.

  • emptyHeight (number) specifies the height of an empty row (see also rowEmptyHeight).

  • end (DayPilot.Date) specifies a custom row end (available since 2024.3.6155).

  • eventHeight (number) specifies the default event height for this resource in pixels.

  • eventStackingLineHeight (number) overrides eventStackingLineHeight for this row.

  • expanded (boolean) sets the initial tree-node expansion state. Set to true to expand the node; omitted or false means collapsed. Supported in Lite from version 2026.4.899 and in Pro.

  • frozen ("top" | "bottom") freezes the row at the specified position.

  • html (string) uses custom HTML instead of name in the row header.

  • marginBottom (number) overrides rowMarginBottom for this row.

  • marginTop (number) overrides rowMarginTop for this row.

  • maxLines (number) sets the maximum number of lines that display concurrent events within a row (available since 2023.1.5515).

  • minHeight (number) overrides rowMinHeight for this row.

  • moveDisabled (boolean) disables row moving for this row.

  • start (DayPilot.Date) specifies a custom row start (available since 2024.2.5924).

  • tags (object) specifies a custom data object.

  • toolTip (string) specifies the hover tooltip text.

Resource Trees in Lite

Lite supports static nested children arrays with multiple levels and per-node expanded state. The application supplies the complete hierarchy, either directly or through rows.load(). Dynamic child loading, frozen rows, and Pro-only resource fields remain outside Lite's resource-tree support. See the resource tree guide for edition differences.

Examples

JavaScript

Resource tree:

const dp = new DayPilot.Scheduler("dp", {
  treeEnabled: true,
  resources: [
    {
      name: "Room A",
      id: "A",
      expanded: true,
      children: [
        { name: "Room A.1", id: "A.1" },
        { name: "Room A.2", id: "A.2" }
      ]
    },
    { name: "Room B", id: "B" },
    { name: "Room C", id: "C" }
  ],
  // ...
});
dp.init();

Angular

<daypilot-scheduler [config]="config"></daypilot-scheduler>
config: DayPilot.SchedulerConfig = {
  treeEnabled: true,
  resources: [
    {
      name: "Room A",
      id: "A",
      expanded: true,
      children: [
        { name: "Room A.1", id: "A.1" },
        { name: "Room A.2", id: "A.2" }
      ]
    },
    { name: "Room B", id: "B" },
    { name: "Room C", id: "C" }
  ],
  // ...
};

React

<DayPilotScheduler
  treeEnabled={true}
  resources={resources}
/>
const resources = [
  {
    name: "Room A",
    id: "A",
    expanded: true,
    children: [
      { name: "Room A.1", id: "A.1" },
      { name: "Room A.2", id: "A.2" }
    ]
  },
  { name: "Room B", id: "B" },
  { name: "Room C", id: "C" }
];

Vue

<DayPilotScheduler
  :treeEnabled="true"
  :resources="resources"
/>
const resources = [
  {
    name: "Room A",
    id: "A",
    expanded: true,
    children: [
      { name: "Room A.1", id: "A.1" },
      { name: "Room A.2", id: "A.2" }
    ]
  },
  { name: "Room B", id: "B" },
  { name: "Room C", id: "C" }
];

See Also

Resource Loading [doc.daypilot.org]

DayPilot.Scheduler Class

Availability

Availability of this API item in DayPilot editions:

ProductLitePro
DayPilot for JavaScript