Skip to content

nowRefresh

Sets how often the line at the present moves, in every view — and, on a timeline that follows the present, how often the axis glides with it.

TypeDurationLike
Default{ minutes: 1 }
Live update (update())Yes
Declared inpackages/dom/src/settings.ts

By default the line moves once a minute, on the minute: between two, it stands where the present was. { seconds: 5 } moves it every five seconds, aligned on the clock (12:00:05, 12:00:10…) — with timeline.follow, the axis glides each time, which reads as continuous. From a second to an hour; anything else throws a RangeError. Live by update(). What ages — the events still running, forget — stays once a minute, however often the line moves.

import { createCalendar } from '@dzcalendar/dom';
import '@dzcalendar/pro';
createCalendar(element, {
timeZone: 'Europe/Paris',
initialView: 'resourceTimelineDay',
resources: [{ id: 'import', title: 'Import' }],
timeline: { span: { hours: 1 }, follow: { before: { minutes: 5 } } },
// The line, and the axis following it, every five seconds.
nowRefresh: { seconds: 5 },
});

In Angular and Vue it goes in options; in React it is a prop.