hiddenDays
Weekdays the calendar leaves out of every view, as ISO weekdays.
| Type | readonly Weekday[] |
|---|---|
| Default | [] |
Live update (update()) | Yes |
| Declared in | packages/core/src/kernel.ts |
What it does
Section titled “What it does”With hiddenDays: [3], a week has no Wednesday: its columns
close up, a month loses that column, and moving or resizing an event never
lands on it. Events on a hidden day are not drawn (they are still there:
the store keeps them).
The numbers are ISO weekdays: 1 Monday … 7 Sunday. weekends: false adds 6
and 7 to these. A view of your own (views) can name its own hiddenDays,
which win for it.
Example
Section titled “Example”import { createCalendar } from '@dzcalendar/dom';
const calendar = createCalendar(element, { timeZone: 'Europe/Paris', hiddenDays: [3] });
// Later: every day again.calendar.update({ hiddenDays: [] });import { Component } from '@angular/core';import type { Weekday } from '@dzcalendar/core';import { DZ_CALENDAR } from '@dzcalendar/angular';
@Component({ selector: 'app-agenda', imports: [DZ_CALENDAR], template: `<dz-calendar timeZone="Europe/Paris" [hiddenDays]="closed" />`,})export class Agenda { // Closed on Wednesdays. readonly closed: readonly Weekday[] = [3];}import { DzCalendar } from '@dzcalendar/react';
export function Agenda() { return <DzCalendar timeZone="Europe/Paris" hiddenDays={[3]} />;}<script setup lang="ts">import { DzCalendar } from '@dzcalendar/vue';</script>
<template> <DzCalendar time-zone="Europe/Paris" :hidden-days="[3]" /></template>In the frameworks it is an input: Angular’s hiddenDays, React’s hiddenDays, Vue’s hidden-days.
Live demo
Section titled “Live demo”The week, Wednesday (3) left out.