Skip to content

snapMinutes

The step, in minutes, that drags, resizes, selections and context-menu moments snap to in a time grid.

Typenumber
Default15
Live update (update())Yes
Declared inpackages/dom/src/settings.ts

A dragged event lands on a multiple of this many minutes; a resize, a selection, the keyboard’s arrows and “New event at 14:30” from the context menu use the same step. It is independent of how the grid is drawn (timeGrid.slotMinutes): a grid labelled every hour can still snap to five minutes. Days in a month are whole days, whatever this says. A value that is not whole minutes from 1 to 1440 throws a RangeError.

import { createCalendar } from '@dzcalendar/dom';
createCalendar(element, { timeZone: 'Europe/Paris', editable: true, snapMinutes: 5 });

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

Drag an event: it moves by five minutes.