Lattice Grid Buy a licence

api reference

Scheduler API Reference

createScheduler: resources as rows and events as bars on a shared time axis, with editing, a workload band, grouping and search, and builders from a Gantt plan, rows or a calendar.

API reference › The resource scheduler

All 24 pages Everything on one page → Developer guide →

The resource scheduler

modules/scheduler is an opt-in resource scheduler: resources as rows in a real Lattice grid on the left and each event as a bar in its resource's row on a shared time axis on the right. It is a separate bundle in the same shape as the other view modules - it adds no weight to a page that does not load it, changes nothing in grid core, and pulls in no dependency beyond the Gantt's shared time scale, zoom presets, calendar and non-working rules, which it reuses rather than copies so both views read the same numbers. The left grid is the page's own createGrid, injected - never bundled - so the scheduler shares the page's one licensed core. It is just another dataset viewer: scheduler.rows.apply({ add, update, remove }) feeds the resources and scheduler.events.apply(...) the events, so a Data Router can attach(value, scheduler) beside a grid, a kanban and a chart.

The data layer. The events can come from three sources without hand-rolling the mapping: schedulerFromGantt(el, gantt, opts) expands a Gantt plan's assignments into one event per task/resource and wires the scheduler's change event back through gantt.applyEdit so a reassign updates the Gantt; schedulerFromRows(el, rows, opts) builds straight over any dataset whose rows carry a resource, start and end (mapped by fields, the Gantt's own vocabulary); and schedulerFromCalendar(el, calendar, opts) reads a calendar's events. With no resources list the scheduler derives its resource rows from the events' resource field. scheduler.reassign(key, resourceId) moves one event between rows and fires change { id, kind, resource: { from, to }, row }, and getState()/setState(state) carry the zoom and scroll across browser history.

import { createScheduler } from '@toclocoinc/lattice-grid/modules/scheduler';

const scheduler = createScheduler(document.querySelector('#scheduler'), {
  resources: [{ id: 'alice', name: 'Alice', role: 'Design', capacity: 4 }],
  events: [{ id: 1, resourceId: 'alice', name: 'Review', startDate: '2026-03-02 09:00', endDate: '2026-03-02 11:00' }],
  createGrid,                   // the page's own grid factory (injected, never bundled)
  zoom: 'day',                  // 'hour' | 'day' | 'week' | 'month' | 'quarter' | px-per-day
  fields: { resourceId: 'resourceId', startDate: 'startDate', endDate: 'endDate', name: 'name' },
});

The time axis reuses the Gantt's own zoom scale - hour, day, week, month and quarter presets, or a bare pixels-per-day number - with pointer-wheel (Ctrl+wheel) and keyboard (+/−) zoom and arrow-key scrolling. A todayLine marks today, and with nonWorking (default on) each resource's own calendar shades its non-working days exactly as the Gantt shades them: a 'weekends' string, a { workdays, holidays } spec, or a name looked up in calendars. Overlapping events in one resource stack into sub-lanes, so a two-hour review never hides the sketch behind it. Rows and time are both virtualised - only the rows and days under the viewport (plus overscan) create DOM, so 500 resources × 20 000 events stays bounded and scrollable. An event whose start cannot be read is counted in unscheduled and reported once, never thrown. With workload: true, each row also draws a histogram band across the bottom of the time axis - one cell per zoom bucket whose fill height is the booked share of the resource's own capacity, computed by the Gantt's computeWorkload against the resource's own calendar and capacity. An over-allocated bucket is highlighted with the theme's danger tokens and a warning glyph (never colour alone), and named resource-by-resource with its periods in an accessible live-region summary, which re-derives live when setEvents(events) replaces the feed. Pass null for the element and the same model answers headlessly.

Find and read the plan. A groupBy - a field name or a per-resource function - groups the resources into collapsible group rows, driven by the left grid's own grouping so the two panes can never disagree; the timeline mirrors the grid's expand/collapse state, and a toggle in either pane collapses the other. A search query narrows both sides at once, matching any string or number field of a resource or event (a row stays when its own text or one of its events' text matches, so a match never orphans its bar). A resourceFilter hides rows, an eventFilter hides bars, and each takes a predicate a row must pass. The Gantt's tooltip card - the same card its bars show - opens on an event's hover and keyboard focus with its start, end, duration and resource. Every bar, row, group header and the time axis is named for screen readers, and the keyboard alone reaches every event: the arrow keys walk between events and rows (roving focus), Enter activates, Home/End jump a row's ends, and +/− zoom - so the scheduler passes the same accessibility audit the grid does.

Events are editable: drag a bar to move it in time, drop it onto another resource row to reassign it, drag either edge to resize it, drag over empty time in a row to create an event, and press Delete (or use the right-click menu) to delete one. Every change snaps to the zoom step, writes back through events.apply - so a bound dataset sees it exactly as it sees a grid edit - and is one undo step: undo()/redo() or Ctrl/Cmd+Z / Ctrl/Cmd+Shift+Z. Each change raises the one cancellable beforeEventChange (call preventDefault() to refuse it, data untouched) and then one event:change carrying the event id and the old and new values. editable: false switches editing off; an event or a resource marked readOnly: true - or named by readOnlyWhen/resourceReadOnlyWhen - refuses the gesture with a catalogued reason.

MemberDescription
createScheduler(el, config)Create a scheduler. Pass a DOM element to render into, or null for a headless scheduler that computes the same placement and axis model.
rows.apply({ add, update, remove }) / rows.forEach / rows.count / rows.get(key)The keyed-diff consumer contract over the resources (the left grid's rows), keyed by resourceKey.
events.apply({ add, update, remove }) / events.forEach / events.count / events.get(key)The same keyed-diff contract over the events, keyed by eventKey.
setZoom('hour'|'day'|'week'|'month'|'quarter'|number) / getZoom()Change the axis scale, re-render and fire zoom:change; a bare number is pixels-per-day and picks the tick level that reads best at that density.
groupBy / setGroupBy(field | (resource) => value)Group the resources into collapsible group rows by a field name or function; null is flat. The left grid does the grouping and the timeline mirrors its collapse state.
search / setSearch(query)A case-insensitive query that narrows both the resource rows and the event bars, matching any string or number field (a row stays when one of its events matches).
resourceFilter / setResourceFilter(fn)A predicate a resource must pass to stay visible; null clears it.
eventFilter / setEventFilter(fn)A predicate an event must pass to keep its bar; null clears it.
toggleGroup(value)Expand or collapse one group by its value (the collapse state lives in the grid, or the scheduler when headless).
setEvents(events)Replace every event outright, keyed by eventKey, and re-render - the complement of events.apply for a host that holds the whole feed at once. The workload band (when on) re-derives in the same pass.
workloadThe last computed workload model when workload is on: { buckets, rows, overAllocated, hoursPerDay, decimals }.
modelThe computed axis { startDay, endDay, pxPerDay, ticks, unscheduled }, for tests and headless callers.
placementThe last placement: byResource (resource key → placed event models), keys and unscheduled.
refresh()Re-seed from the config arrays (unless a diff has landed) and re-render.
edit.move(key, deltaDays) / edit.reassign(key, resourceKey) / edit.resize(key, edge, day) / edit.create(resourceKey, startDay, endDay) / edit.remove(key)The editing controller: move in time, reassign to a row, resize one edge, create and delete - each one undo step and one event:change, refused on a read-only event or resource.
undo() / redo() / canUndo() / canRedo()Step the edit history back and forth (Ctrl/Cmd+Z and Ctrl/Cmd+Shift+Z from the keyboard do the same).
reassign(key, resourceId)Move an event to another resource row and fire change; returns false for an unknown key or an unchanged resource.
getState() / setState(state)Serialise and reapply the restorable view state (zoom and the timeline scroll) across browser history.
schedulerFromGantt(el, gantt, opts) / schedulerFromRows(el, rows, opts) / schedulerFromCalendar(el, calendar, opts)Build a scheduler over a Gantt plan's assignments (wired so a reassign writes back), a plain dataset, or a calendar's events.
on(name, fn) / off(name, fn)Events: zoom:change { level, px }; change { id, kind, resource: { from, to }, row } on a reassign; the cancellable beforeEventChange (veto with preventDefault()), eventChange:cancelled, and event:change { id, action, changes, oldValues, newValues }.
destroy()Destroy the left grid, empty the element, remove only what the module added, and drop handlers and caches. The host still owns the element.

Placement, lanes, workload, zoom, grouping, search, editing and export, executed

Two resources, three events (two overlapping into two sub-lanes on Alice's row), the day axis, the keyed-diff contract, the per-resource workload band, grouping, search and the two filters, an edit and its undo, and a print-safe SVG export of the visible range, run headless on every build.

const { createScheduler } = await import('../packages/modules/scheduler/index.js');
const sched = createScheduler(null, {
  resources: [
    { id: 'alice', name: 'Alice', role: 'Design', capacity: 4, calendar: 'weekends' },
    { id: 'bob', name: 'Bob', role: 'Dev', capacity: 3 },
  ],
  events: [
    { id: 1, resourceId: 'alice', name: 'Review', startDate: '2026-03-02 09:00', endDate: '2026-03-02 11:00', status: 'done' },
    { id: 2, resourceId: 'alice', name: 'Sketch', startDate: '2026-03-02 10:00', endDate: '2026-03-02 12:00', status: 'wip' },
    { id: 3, resourceId: 'bob', name: 'Build', startDate: '2026-03-03 09:00' },
  ],
  fields: { resourceId: 'resourceId', startDate: 'startDate', endDate: 'endDate', name: 'name' },
  resourceKey: 'id', eventKey: 'id',
  zoom: 'day', date: '2026-03-02',
  defaultDuration: 60, rowHeight: 34, weekStartDay: 1,
  todayLine: true, nonWorking: true,
  calendars: { weekends: 'weekends' },
  workload: true,
  colorProperty: 'status', colorMap: { done: '#16a34a' },
  ariaLabel: 'Scheduler', labels: { resource: 'Resource' },
  overscan: 5,
  groupBy: 'role',
  search: '', resourceFilter: null, eventFilter: null,
  editable: true,
  readOnlyWhen: (e) => e.readOnly,
  resourceReadOnlyWhen: (r) => r.readOnly,
});
const resources = sched.rows.count;                       // 2
const events = sched.events.count;                        // 3
const alice = sched.placement.byResource.get('alice');
const overlap = alice.length;                             // 2 (two sub-lanes)
const unscheduled = sched.model.unscheduled.length;       // 0
const px = sched.model.pxPerDay;                          // 26 (the day preset)
const hasTicks = sched.model.ticks.length > 0;           // true
const groups = sched.displayRows.filter((r) => r.type === 'group').length; // 2
sched.setSearch('review');
const matchedEvents = sched.ctx.visibleEvents.length;     // 1
const matchedResources = sched.ctx.visibleResources.length; // 1
sched.setSearch('');
sched.setEventFilter((e) => e.status === 'done');
const filteredEvents = sched.ctx.visibleEvents.length;    // 1
sched.setEventFilter(null);
sched.setResourceFilter((r) => r.role !== 'Dev');
const filteredResources = sched.ctx.visibleResources.length; // 1
sched.setResourceFilter(null);
const wlRows = sched.workload.rows.size;                  // 2 (one band row per resource)
const wlOver = sched.workload.overAllocated.length;       // 0 (nothing over-allocated)
const changed = sched.edit.move(1, 1).ok;                 // true (moved one day)
const movedStart = sched.events.get(1).startDate;         // 2026-03-03 09:00
sched.undo();
const undone = sched.events.get(1).startDate;             // 2026-03-02 09:00
sched.setZoom('week');
const zoom = sched.getZoom().level;                       // week
sched.rows.apply({ add: [{ id: 'carol', name: 'Carol' }] });
const after = sched.rows.count;                           // 3
const svg = sched.toSVG();                                // the visible range as one standalone SVG
const isSvg = /^<svg /.test(svg);                      // true
const hasBars = (svg.match(/<rect /g) || []).length >= 3;  // true (one bar per placed event)
const noVar = svg.includes('var(') === false;             // true (print-safe palette, no tokens)
const printed = sched.print();                            // false (no window to open, headless)
sched.destroy();
return [resources, events, overlap, unscheduled, px, hasTicks, groups, matchedEvents, matchedResources, filteredEvents, filteredResources, wlRows, wlOver, changed, movedStart, undone, zoom, after, isSvg, hasBars, noVar, printed].join('|');

Type reference

Generated from the type declarations, so it always matches the release. Each surface lists its properties, its methods and the events it raises as three tables; an option or value type lists its members once.

The scheduler module

SchedulerFields

The field-to-property mapping naming the data each event and resource reads.

PropertyTypeDescription
resourceIdstringThe field on an event naming its resource (the resource key). Default `'resourceId'`. (optional)
startDatestringThe field on an event naming its start. Default `'startDate'`. (optional)
endDatestringThe field on an event naming its end; omitted falls back to `defaultDuration`. (optional)
namestringThe field naming an event's display text. Default `'name'`. (optional)
calendarstringThe field on a resource naming its calendar (a spec, or an id into `calendars`). (optional)

SchedulerCalendar

A non-working calendar spec: the `'weekends'` shorthand, or workdays plus holidays.

PropertyTypeDescription
workdaysnumber[]Working weekdays, 0=Sun…6=Sat. Default Mon-Fri. (optional)
holidaysunknown[]Non-working dates, as `Date`, `'YYYY-MM-DD'` or day numbers. (optional)

SchedulerWorkload

The `workload` band option: a per-resource utilisation strip drawn at the bottom of each row, computed with the Gantt's own `computeWorkload` against each resource's calendar and capacity.

PropertyTypeDescription
hoursPerDaynumberHours per working day, the demand unit a calendar-less capacity is measured against. Default 8. (optional)
defaultCapacitynumberThe unitless capacity a calendar-less resource with none stated reads as. Default 1. (optional)
decimalsnumberDecimal places in the over-allocation percentage. Default 1. (optional)

SchedulerKeyedRows

A keyed-diff consumer surface, the same contract a grid's `rows` exposes.

PropertyTypeDescription
countnumberThe number of stored rows. (read-only)
MethodSignatureParametersReturnsDescription
apply(change: { add?: SchedulerRow[]; update?: SchedulerRow[]; remove?: unknown[] }): voidchange: { add?: SchedulerRow[]; update?: SchedulerRow[]; remove?: unknown[] }voidSet `add` rows, merge `update` patches, drop `remove` keys.
forEach(fn: (row: SchedulerRow, key: unknown) => void): voidfn: (row: SchedulerRow, key: unknown) => voidvoidIterate the stored rows.
get(key: unknown): SchedulerRow | undefinedkey: unknownSchedulerRow | undefinedThe row stored under a key.

SchedulerModel

The scheduler's computed model, for tests and headless callers.

PropertyTypeDescription
startDaynumber | nullThe first day of the axis span, a whole day-number.
endDaynumber | nullThe exclusive end of the axis span, a whole day-number.
pxPerDaynumberThe pixels-per-day the axis is drawn at.
ticks{ day: number; label: string }[]The header ticks, `{ day, label }`.
unscheduled{ key: unknown; row: SchedulerRow }[]Events whose start could not be read.

SchedulerPlacement

The event placement, for tests and headless callers.

PropertyTypeDescription
byResourceMap<unknown, unknown[]>Resource key → placed event models.
unscheduledunknown[]Events whose start could not be read.
keysMap<unknown, unknown>Event key → placed event model.

SchedulerConfig

The configuration for {@link createScheduler}. `resources` are the left grid's rows; `events` draw as bars. `createGrid` is the page's own grid factory, injected so the scheduler shares the page's one core.

Properties
PropertyTypeDescription
resourcesSchedulerRow[]The resources (one row each), or seed through `rows.apply`. (optional)
eventsSchedulerRow[]The events (one bar each), or seed through `events.apply`. (optional)
fieldsSchedulerFieldsThe field-to-property mapping naming the data each event and resource reads. (optional)
createGridunknownThe grid factory the left resource table mounts through (required for a DOM mount). (optional)
resourceKeystringThe resource identity field. Default `'id'`. (optional)
eventKeystringThe event identity field. Default `'id'`. (optional)
columnsunknown[]The left table's columns; defaults to name/role/capacity. (optional)
zoomSchedulerZoom 'hour' | 'day' | 'week' | 'month' | 'quarter' | numberThe zoom: a preset name or px-per-day. Default `'day'`. (optional)
dateDate | string | numberThe anchor date the axis centres on. Default the earliest event start, else today. (optional)
defaultDurationnumberThe minutes an event without an end runs. Default 60. (optional)
rowHeightnumberThe row height in px. Default 34. (optional)
localestringBCP-47 locale for tick labels. (optional)
timeZonestringIANA time-zone name for tick labels. Default UTC. (optional)
weekStartDaynumberWeek-start weekday, 0=Sun…6=Sat. (optional)
todayLinebooleanDraw the today line. Default true. (optional)
nonWorkingbooleanShade each resource's non-working days from its calendar. Default true. (optional)
calendarsRecord<string, SchedulerCalendar | 'weekends'>Named calendars referenced by a resource's `calendar` field. (optional)
workloadboolean | SchedulerWorkloadDraw the per-resource utilisation band; `true` takes the defaults. (optional)
ariaLabelstringThe root's accessible label. (optional)
messagesunknownA message catalogue with a `t(key, params)` formatter. (optional)
labelsRecord<string, string>Raw label overrides for the built-in English. (optional)
overscannumberExtra rows rendered above/below the viewport. Default 5. (optional)
colorPropertystringA field whose value colours the bar edge. (optional)
colorMapRecord<string, string>Value → CSS colour for `colorProperty`. (optional)
groupBystring | ((resource: SchedulerRow) => unknown) | nullGroup the resources by a field name or a per-resource function; `null` is flat. (optional)
searchstringA case-insensitive query that narrows both the resource rows and the event bars. (optional)
editablebooleanEnable pointer/keyboard editing of events. Default true. (optional)
Methods
MethodSignatureParametersReturnsDescription
resourceFilter((resource: SchedulerRow) => unknown) | null(resource: SchedulerRow) => unknown| nullA predicate a resource must pass to stay visible; `null` clears it. (optional)
eventFilter((event: SchedulerRow) => unknown) | null(event: SchedulerRow) => unknown| nullA predicate an event must pass to keep its bar; `null` clears it. (optional)
readOnlyWhen(event: SchedulerRow) => booleanevent: SchedulerRow=> booleanA predicate naming events that refuse edits (a read-only event). (optional)
resourceReadOnlyWhen(resource: SchedulerRow) => booleanresource: SchedulerRow=> booleanA predicate naming resources that refuse edits (a read-only row). (optional)
Events

No events.

SchedulerEventChange

The payload every scheduler edit event carries: the event id, the changed fields and the before/after snapshots.

PropertyTypeDescription
idunknownThe event's key.
action'move' | 'reassign' | 'resize' | 'create' | 'delete'What changed: `'move' | 'reassign' | 'resize' | 'create' | 'delete'`.
changesSchedulerEventFieldChangesEach changed field's old and new values (empty for create/delete).
oldValuesRecord<string, unknown> | nullThe editable fields before the edit, or null for a create.
newValuesRecord<string, unknown> | nullThe editable fields after the edit, or null for a delete.
eventunknownThe originating DOM event, or null for an API call.

SchedulerEventChangeEvent

The cancellable `beforeEventChange` payload: cancelling it refuses the edit, data untouched.

MethodSignatureParametersReturnsDescription
preventDefault(reason?: string): voidreason?: stringvoidCancel the edit before it is written.

SchedulerEventChangeCancelled

The `eventChange:cancelled` payload: a `beforeEventChange` was vetoed.

PropertyTypeDescription
reasonstringWhy the edit was cancelled.

SchedulerZoomChangeEvent

The `zoom:change` payload: the new zoom level and px-per-day.

PropertyTypeDescription
levelstringThe zoom level name.
pxnumberThe pixels-per-day.

SchedulerReassignEvent

The `change` payload: a reassign moved an event to another resource row.

PropertyTypeDescription
idunknownThe event's key.
kind'reassign'Always `'reassign'`.
resource{ from: unknown; to: unknown }The old and new resource keys.
rowSchedulerRowThe event row after the reassign.

SchedulerEventPayloads

The payload each scheduler event name carries.

PropertyTypeDescription
zoom:changeSchedulerZoomChangeEventThe new zoom level and px-per-day, after `setZoom` re-rendered.
changeSchedulerReassignEventA reassign wrote a new resource onto the event, carrying the old and new keys.
beforeEventChangeSchedulerEventChangeEventThe edit about to be written, with `preventDefault` to refuse it.
eventChange:cancelledSchedulerEventChangeCancelledThe edit a `beforeEventChange` handler vetoed, with the reason.
event:changeSchedulerEventChangeThe committed edit (or undo/redo), carrying the id and old/new values.

Scheduler

The scheduler instance {@link createScheduler} returns.

Properties
PropertyTypeDescription
rowsSchedulerKeyedRowsThe keyed-diff surface over the resources (the left grid's rows).
eventsSchedulerKeyedRowsThe keyed-diff surface over the events.
resourcesSchedulerRow[]The live resource array.
rowKeystringThe resource identity field.
eventKeystringThe event identity field.
modelSchedulerModelThe last computed model.
placementSchedulerPlacementThe last event placement.
editunknownThe editing controller: `move`, `reassign`, `resize`, `create`, `remove`, `undo`, `redo`.
Methods
MethodSignatureParametersReturnsDescription
refresh(): Scheduler - SchedulerRe-seed from the config arrays (unless a diff landed) and re-render.
setEvents(events: SchedulerRow[]): Schedulerevents: SchedulerRow[]SchedulerReplace every event and re-render, keyed by `eventKey`.
setZoom(zoom: SchedulerZoom): Schedulerzoom: SchedulerZoomSchedulerChange the zoom and re-render, firing `zoom:change`.
getZoom(): { level: string; px: number } - { level: string; px: number }The current zoom `{ level, px }`.
setGroupBy(groupBy: string | ((resource: SchedulerRow) => unknown) | null): SchedulergroupBy: string | ((resource: SchedulerRow) => unknown) | nullSchedulerGroup the resources by a field or function, re-mounting the left grid.
setSearch(query: string): Schedulerquery: stringSchedulerSet the search query that narrows rows and bars; `''` clears it.
setResourceFilter(fn: ((resource: SchedulerRow) => unknown) | null): Schedulerfn: ((resource: SchedulerRow) => unknown) | nullSchedulerSet the resource filter; `null` clears it.
setEventFilter(fn: ((event: SchedulerRow) => unknown) | null): Schedulerfn: ((event: SchedulerRow) => unknown) | nullSchedulerSet the event filter; `null` clears it.
toggleGroup(value: unknown): Schedulervalue: unknownSchedulerExpand or collapse one group by its value.
undo(opts?: { origin?: string }): booleanopts?: { origin?: string }booleanUndo the most recent edit.
redo(opts?: { origin?: string }): booleanopts?: { origin?: string }booleanRedo the most recently undone edit.
canUndo(): boolean - booleanWhether there is an edit to undo.
canRedo(): boolean - booleanWhether there is an edit to redo.
on(name: SchedulerEventName, fn: (payload: SchedulerEventPayloads[SchedulerEventName]) => void): () => voidname: SchedulerEventName
fn: (payload: SchedulerEventPayloads[SchedulerEventName]) => void
() => voidSubscribe to a scheduler event; returns an unsubscribe function.
off(name: SchedulerEventName, fn: (payload: SchedulerEventPayloads[SchedulerEventName]) => void): voidname: SchedulerEventName
fn: (payload: SchedulerEventPayloads[SchedulerEventName]) => void
voidRemove an event handler.
toSVG(svgOpts?: { range?: { from?: number | string | Date; to?: number | string | Date } }): stringsvgOpts?: { range?: { from?: number | string | Date; to?: number | string | Date } }stringSerialise the scheduler - the resource table, the time axis and the placed bars - to a standalone SVG string, drawn with a print-safe palette independent of the mounted theme. `''` before anything has been laid out.
toPNG(pngOpts?: { range?: { from?: number | string | Date; to?: number | string | Date }; scale?: number; background?: string; }): Promise<Blob | null>pngOpts?: { range?: { from?: number | string | Date; to?: number | string | Date }; scale?: number; background?: string; }Promise<Blob | null>This scheduler as a PNG: `toSVG` rasterised through a canvas. Makes no network request. `null` when nothing is laid out or there is no canvas to rasterise with.
print(printOpts?: { paper?: 'A4' | 'Letter' | 'A3'; orientation?: 'landscape' | 'portrait'; fitToWidth?: boolean; scale?: number; title?: string | false; header?: string | ((page: number, pages: number) => string) | false; footer?: string | ((page: number, pages: number) => string) | false; }): booleanprintOpts?: { paper?: 'A4' | 'Letter' | 'A3'; orientation?: 'landscape' | 'portrait'; fitToWidth?: boolean; scale?: number; title?: string | false; header?: string | ((page: number, pages: number) => string) | false; footer?: string | ((page: number, pages: number) => string) | false; }booleanPrint this scheduler - the resource table, the time axis and the bars - paged and scaled: the table header and time header repeat on every page and no row is split across a page boundary. Opens the browser's own print path over a standalone document; "PDF" is whatever the browser's print dialog offers ("Save as PDF") - no server, no dependency. Always prints in a fixed, print-safe light palette, independent of the mounted theme.
reassign(key: unknown, resourceId: unknown): booleankey: unknown
resourceId: unknown
booleanMove an event to another resource row and fire `change` (`{ id, kind: 'reassign', resource: { from, to }, row }`). Returns false when the event key is unknown or the resource is unchanged.
getState(): { version: number; zoom: string; scroll: { left: number; top: number } } - { version: number; zoom: string; scroll: { left: number; top: number } }Serialise the restorable view state: `{ version, zoom, scroll }`.
setState(state: object): Schedulerstate: objectSchedulerReapply a state snapshot from {@link Scheduler.getState}.
destroy(): void - voidTear the scheduler down.
Events
EventWhenPayloadCancellable
zoom:changeFires after the zoom changed.SchedulerZoomChangeEventno
changeFires after a reassign moved an event to another resource row.SchedulerReassignEventno
beforeEventChangeFires before a move/reassign/resize/create/delete commits; cancellable.SchedulerEventChangeEventyes
eventChange:cancelledFires when a `beforeEventChange` handler vetoed the edit.SchedulerEventChangeCancelledno
event:changeFires after an edit (or an undo/redo) committed, carrying the id and old/new values.SchedulerEventChangeno