CalendarOptions

View as Markdown

Options for managing holidays, weekends and working days in AdapTable.

A working day is any calendar day that is neither a configured weekend day nor a configured holiday. Display formatting of dates is unrelated — use Format Column (or AG Grid value formatters) for that.

TypeScript
export interface

Properties

PropertyTypeDescriptionDefault
holidays(Date | string)[] | ((baseContext:BaseContext) => (Date | string)[] | undefined)Public / bank holidays for the current user (calendar days only).

These are distinct from weekends: a Saturday is not a holiday unless it is
also listed here. Entries may be Date instances or ISO date strings
(yyyy-MM-dd).
undefined
weekendDaysnumber[]Days of the week treated as weekend (non-working), using JavaScript
Date.getDay() values: 0 = Sunday … 6 = Saturday.
[0, 6]
weekStartsOnnumberFirst day of the week for week-related Expression Functions
(WEEK, START_OF_WEEK, IS_THIS_WEEK), using JavaScript
Date.getDay() values: 0 = Sunday … 6 = Saturday.

Independent of .
0

Property Details

holidays

Public / bank holidays for the current user (calendar days only).

These are distinct from weekends: a Saturday is not a holiday unless it is also listed here. Entries may be Date instances or ISO date strings (yyyy-MM-dd).

TypeScript
holidays?: (Date | string)[] | ((baseContext: BaseContext) => (Date | string)[] | undefined);
Default Value

undefined

Property Value

(Date | string)[] | ((baseContext:BaseContext) => (Date | string)[] | undefined)

weekendDays

Days of the week treated as weekend (non-working), using JavaScript Date.getDay() values: 0 = Sunday … 6 = Saturday.

TypeScript
weekendDays?: number[];
Default Value

[0, 6]

Property Value

number[]

weekStartsOn

First day of the week for week-related Expression Functions (WEEK, START_OF_WEEK, IS_THIS_WEEK), using JavaScript Date.getDay() values: 0 = Sunday … 6 = Saturday.

Independent of .

TypeScript
weekStartsOn?: number;
Default Value

0

Property Value

number