eventMaxStack
How many overlapping events a time grid draws side by side before “+N”.
| Type | number | 'auto' | null |
|---|---|
| Default | 'auto' |
Live update (update()) | Yes |
| Declared in | packages/dom/src/calendar.ts |
What it does
Section titled “What it does”Events at the same time share their column’s width. Past this many, the column keeps one lane fewer and puts the rest behind a “+N” in the last lane, one per stretch of time.
'auto'(the default): as many as the column’s width allows, about 2.5rem each — a phone’s narrow columns stack fewer than a desktop’s.- A number: at most that many (1: all of a crowded moment behind one “+N”).
null: all of them, however thin.
“+N” opens a panel with the events behind it.
Example
Section titled “Example”import { createCalendar } from '@dzcalendar/dom';
const calendar = createCalendar(element, { timeZone: 'Europe/Paris', eventMaxStack: 3 });
// Later: every event, however thin.calendar.update({ eventMaxStack: null });import { Component } from '@angular/core';import { DZ_CALENDAR } from '@dzcalendar/angular';
@Component({ selector: 'app-agenda', imports: [DZ_CALENDAR], template: `<dz-calendar timeZone="Europe/Paris" [options]="{ eventMaxStack: 3 }" />`,})export class Agenda {}import { DzCalendar } from '@dzcalendar/react';
export function Agenda() { return <DzCalendar timeZone="Europe/Paris" eventMaxStack={3} />;}<script setup lang="ts">import { DzCalendar } from '@dzcalendar/vue';</script>
<template> <DzCalendar time-zone="Europe/Paris" :options="{ eventMaxStack: 3 }" /></template>In Angular and Vue it goes in options; in React it is a prop.
Live demo
Section titled “Live demo”Four events overlap on Wednesday morning: at most three, so two show and “+2” holds the rest.
See also
Section titled “See also”dayMaxLanes— the same in a month.timeGrid— the time grid’s hours and scale.hooks— “+N” and its panel.