dayMaxLanes
How many rows of events a day of a month (or of a year) shows before “+N”.
| Type | number | 'auto' | null |
|---|---|
| Default | null in a month (every event), 'auto' in a year |
Live update (update()) | Yes |
| Declared in | packages/dom/src/calendar.ts |
What it does
Section titled “What it does”null: every event — the weeks grow to hold them, and the month scrolls. The default in a month: nothing is hidden unless you ask.'auto': as many as the cell’s height holds, then “+N” — the default in a multi-month year’s tiny days, and the right choice for a crowded month.- A number: that many rows, the last one becoming “+N” when more events fall on the day.
“+N” opens a panel with the day’s events (its look: hooks.moreLink,
hooks.morePopover). Given, a number or null holds in every day grid (a month,
a week or a day of day cells, a year); 'auto' caps a month and a year only —
a week or a day of cells grows to show everything. Left out, each view takes
its own default again when it is shown. It does not touch the time grid
(eventMaxStack) nor the timeline (timeline.maxLanes).
Example
Section titled “Example”import { createCalendar } from '@dzcalendar/dom';
const calendar = createCalendar(element, { timeZone: 'Europe/Paris', initialView: 'dayGridMonth', dayMaxLanes: 'auto' });
// Later: every event again.calendar.update({ dayMaxLanes: 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" view="dayGridMonth" [options]="{ dayMaxLanes: 3 }" />`,})export class Agenda {}import { DzCalendar } from '@dzcalendar/react';
export function Agenda() { return <DzCalendar timeZone="Europe/Paris" defaultView="dayGridMonth" dayMaxLanes="auto" />;}<script setup lang="ts">import { DzCalendar } from '@dzcalendar/vue';</script>
<template> <DzCalendar time-zone="Europe/Paris" view="dayGridMonth" :options="{ dayMaxLanes: 'auto' }" /></template>In Angular and Vue it goes in options; in React it is a prop.
Live demo
Section titled “Live demo”Two rows a day: Thursday the 22nd holds five all-day events, so one shows and the second row is “+4 more”.
See also
Section titled “See also”eventMaxStack— the same in a time grid.multiMonthMaxColumns— a year’s months side by side.hooks— “+N” and its panel (hooks.moreLink, hooks.morePopover).