Skip to main content

setMode()

Description

Sets a view mode of Event Calendar

Usage

setMode({ value: string | number }): void;

Parameters

  • value - (required) a view mode ID specified in the config.views property.
info

You can set the value parameter to the "day", "week", "month", "year", "agenda" or "timeline" view IDs used by default, or define a custom ID in the config.views property

Example

// create Event Calendar
const calendar = new eventCalendar.EventCalendar("#root", {
// initial configuration parameters
});
// set the "timeline" mode
calendar.setMode({ value: "timeline" });

Change log: The timeline mode was added in v2.0