DayPilot.Calendar.update

Declaration

DayPilot.Calendar.update([options])

Parameters

  • options - object with properties and events to be updated (object)

Even if the options parameter is not specified, all changes made directly to the DayPilot.Calendar object properties will be applied during the update.

Notes

Updates the control after changing the properties.

Refreshes the control, including headers, background cells, and events.

Examples

Loading events

var data = [
  {
      id: 1,
      start: DayPilot.Date.today().addHours(10),
      end: DayPilot.Date.today().addHours(11),
      text: "Event 1"
  },
  {
      id: 2,
      start: DayPilot.Date.today().addHours(13),
      end: DayPilot.Date.today().addHours(16),
      text: "Event 2"
  }
];
dp.update({events: data});

Changing the calendar view type

dp.viewType = "Day";
dp.update();