edit doc

Get/Set Options Dynamically

You can get/set calendar options after a calendar has already been initialized.

Getting

You can query for the current value of a calendar option:

calendar.getOption('locale');

This will only return options that are global to the calendar. This method will not return View-Specific Options.

Setting

It is possible to dynamically set options after initalization. These option modifications will be applied to all views. It is not currently possible to set View-Specific Options in this manner.

Can you dynamically set a single option:

calendar.setOption('locale', 'fr');

Exceptions

Some options need to be manipulated through methods:

Event Sources should be dynamically manipulated through methods like addEventSource and remove. Thusly, dynamic setting of the following options is not applicable:

  • events
  • eventSources

Some options affect processing of event data. Dynamically setting them will not change current event data, but will take effect for future event fetches:

  • defaultTimedEventDuration
  • defaultAllDayEventDuration
  • defaultAllDay
  • forceEventDuration
  • eventDataTransform
  • startParam
  • endParam
  • timeZoneParam

Dynamic setting of some options is simply not yet implemented:

  • handleWindowResize
  • views