View as Markdown

Calendar Options

CalendarOptions

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.

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).

Default

undefined

weekendDays?

number[]

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

Default

[0, 6]

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 .

Default

0

Find Out More

See Holiday Calendars for how holidays, weekends and week start are supplied


Calendar API

CalendarApi

Calendar, holiday and working-day helpers.

Working days are derived from calendarOptions: a day is working when it is not a configured weekend day and not a configured holiday.

Returns the next working day after from (defaults to today).
Never returns from itself.

Returns the previous working day before from (defaults to today).
Never returns from itself.

getWeekStartsOn()
returns

number

First day of the week for week-number / start-of-week Expression Functions
(calendarOptions.weekStartsOn, default 0 = Sunday).

True when the date is in the configured holiday list.
Weekends are not holidays unless also listed in calendarOptions.holidays.

Returns true if both dates are the same calendar day (time ignored).

isToday(dateToCheck)
returns

boolean

Returns true if the given date is today

Returns true if the given date is tomorrow

True when the date falls on a configured weekend day
(calendarOptions.weekendDays, default Saturday/Sunday).

True when the date is neither a weekend day nor a configured holiday.

Returns true if the given date is yesterday