Agent-readable demo data

Title
Time Scale: Minutes (JavaScript Scheduler) | DayPilot Pro for JavaScript Demo
Tree
DayPilot JavaScript Demo
Catalog root
Default
Description
This Scheduler shows 15-minute time slots. Read more about the scheduler scale [doc.daypilot.org].

Inline demo script 1

const dp = new DayPilot.Scheduler("dp", {
            startDate: "2026-03-24",
            days: 7,
            timeHeaders: [
                {groupBy: "Day"},
                {groupBy: "Hour"},
                {groupBy: "Cell"}
            ],
            scale: "CellDuration",
            cellDuration: 15,
            treeEnabled: true,
            resources: [
                {name: "Room A", id: "A"},
                {name: "Room B", id: "B"},
                {name: "Room C", id: "C"},
                {name: "Room D", id: "D"},
                {name: "Room E", id: "E"},
                {name: "Room F", id: "F"},
                {name: "Room G", id: "G"},
                {name: "Room H", id: "H"},
                {name: "Room I", id: "I"},
                {name: "Room J", id: "J"},
                {name: "Room K", id: "K"}
            ],
            onTimeRangeSelected: async args => {
                const modal = await DayPilot.Modal.prompt("New event name:", "Event");
                const name = modal.result;
                dp.clearSelection();
                if (!name) return;
                dp.events.add({
                    start: args.start,
                    end: args.end,
                    id: DayPilot.guid(),
                    resource: args.resource,
                    text: name
                });
                dp.message("Created");
            },
            snapToGrid: false,
            useEventBoxes: "Never",
            onEventMoving: args => {
                const offset = args.start.getMinutes() % 5;
                if (offset) {
                    args.start = args.start.addMinutes(-offset);
                    args.end = args.end.addMinutes(-offset);
                }
                args.left.enabled = true;
                args.left.html = args.start.toString("h:mm tt");
            },
            cellWidth: 60,
            height: 350
        });

        dp.init();
        dp.scrollTo("2026-03-24T16:00:00");