Holiday Format

Explore the complete JSON format and property list for managing calendar holidays. This guide outlines every available field to help developers efficiently create, update, and organize holidays within the library.

Example

const today = new Date();

let holiday = {
    day: today.getDate(),
    month: today.getMonth() + 1,
    year: today.getFullYear(),
    title: "Google Day",
};

calendarInstance.addHolidays( [ holiday ] );

Options

Type:Name:Description
numberdayThe day that the holiday occurs.
numbermonthThe month that the holiday occurs.
numberyearThe year that the holiday occurs (if the holiday only occurs once. Defaults to null).
stringtitleThe title for the holiday (i.e. Christmas Day).
ObjectonClickSpecifies an event that will be triggered when the holiday is clicked.
stringonClickUrlSpecifies a URL that will be opened when the holiday is clicked (overrides “onClick”).
stringbackgroundColorThe background color the day should use (defaults to null).
stringtextColorThe text color the day should use (defaults to null).