Skip to content

scrollTime

The time of day a time grid is scrolled to when it is first shown.

TypeDurationLike
Default'PT8H'
Live update (update())Yes — the next time a time grid or a timeline is shown after another kind of view
Declared inpackages/dom/src/calendar.ts

A day has 24 hours and the screen shows a few: the grid opens scrolled to this time, as a duration from midnight ('PT8H', { hours: 7, minutes: 30 }). With timeGrid: { slotMin }, the hours before it are not drawn and the scroll counts from there.

It is applied when a time grid (or the Pro’s timeline) is shown: at first, and again when one comes back after another kind of view — a month, a list. Moving from a week to a day keeps where the person scrolled.

import { createCalendar } from '@dzcalendar/dom';
createCalendar(element, { timeZone: 'Europe/Paris', scrollTime: { hours: 7, minutes: 30 } });

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

The week opens scrolled to 07:00.