DayPilot.Switcher.addTrigger

The addTrigger() method adds a view change trigger (e.g. a button) and links it to a specified view (DayPilot.Calendar or DayPilot.Month component).

This method is an alternative to specifying options.triggers[] item in the constructor.

Declaration

DayPilot.Switcher.addTrigger(trigger, view);

Parameters

  • trigger (string or HTMLElement) - the DOM element of the trigger or its id
  • view (DayPilot.Calendar or DayPilot.Month) - the target calendar view