Holiday Calendars

View as Markdown

Summary

  • AdapTable lets developers configure holidays and weekend days for working-day logic
  • These feed Column Filters / Expressions such as IS_WORKDAY, IS_HOLIDAY, WORKDAY and NETWORKDAYS
  • Holidays can be provided as a list of dates (or ISO strings) or via a function

Working days, weekends and holidays

AdapTable treats these as three distinct ideas:

ConceptMeaning
WeekendDays listed in calendarOptions.weekendDays (default Saturday & Sunday)
HolidayDays listed in calendarOptions.holidays (public / bank holidays you supply)
Working dayAny day that is neither a weekend nor a holiday

Note

A weekend is not a holiday unless you also list it in holidays. Use IS_WORKDAY / NOT IS_WORKDAY when you care about non-working days in general.

Caution

  • AdapTable has no built-in public-holiday calendar (even for New Year's Day)
  • Developers must supply holidays relevant to each user or market

Date display formatting is unrelated — use Format Column (or AG Grid value formatters).

Providing holidays

Holidays are set via the holidays property in Calendar Options.

holidays

(Date \| string)[]
Configured public holidays (calendar days)

Providing a list of holidays

// Set Christmas and New Year as public holidays
const adaptableOptions: AdaptableOptions = {
  calendarOptions: {
    holidays: ['2026-12-25', '2027-01-01'],
  },
}

Providing a function

The function receives BaseContext and returns a list of dates (useful for per-user calendars):

const adaptableOptions: AdaptableOptions = {
  calendarOptions: {
    holidays: (baseContext: BaseContext) => {
      return [new Date(2026, 11, 25), new Date(2027, 0, 1)]
    },
  },
}

Custom weekend days

Weekend days are set via the weekendDays property in Calendar Options.

weekendDays

Default: [0, 6]
number[]
Days of the week treated as weekend (non-working)

Week start (for week expressions)

The first day of the week is set via the weekStartsOn property in Calendar Options.

weekStartsOn

Default: 0
number
First day of the week for week-related Expression Functions

Expression Functions that use the calendar

These AdapTableQL functions honour holidays and weekendDays:

  • IS_WORKDAY / IS_HOLIDAY
  • IS_NEXT_WORKDAY / IS_PREV_WORKDAY
  • WORKDAY / NETWORKDAYS (Expression Editor)

Datepicker Next Workday / Prev Workday buttons use the same rules.

Providing Custom Holidays
Fork
  • This demo shows how to provide AdapTable with custom holidays
  • The Grid contains one row per date from 22 December 2026 to 3 January 2027
  • Three of those dates are holidays: Christmas Day (25 Dec), Boxing Day (26 Dec) and New Year's Day (1 Jan)
  • The Layout applies an IS_WORKDAY Column Filter, so the holidays (and weekends) are excluded

Expand to see Calendar definitions

Loading demo…

Find Out More

The full property list is in the Calendar Technical Reference