Skip to content

weekends

False leaves Saturday and Sunday out of every view.

Typeboolean
Defaulttrue
Live update (update())Yes
Declared inpackages/dom/src/calendar.ts

weekends: false is hiddenDays with 6 and 7 added: a week of five days, a month of five columns. The two combine — weekends: false with hiddenDays: [3] shows Monday, Tuesday, Thursday and Friday.

Saturday and Sunday here are ISO days 6 and 7, whatever the locale: where the weekend falls on Friday and Saturday, hide [5, 6] with hiddenDays instead.

import { createCalendar } from '@dzcalendar/dom';
const calendar = createCalendar(element, { timeZone: 'Europe/Paris', weekends: false });
// Later: the whole week.
calendar.update({ weekends: true });

In the frameworks it is an input: Angular’s weekends, React’s weekends, Vue’s weekends.

The week, Monday to Friday.