2009-09-14 00:25:49 +02:00
|
|
|
|
|
|
|
Methods
|
|
|
|
=======
|
|
|
|
|
2009-09-14 05:36:27 +02:00
|
|
|
The following are methods that can be called on a FullCalendar-initialized
|
2009-09-14 00:25:49 +02:00
|
|
|
jQuery object:
|
|
|
|
|
2009-09-14 05:36:27 +02:00
|
|
|
**prev** - .fullCalendar('prev')
|
|
|
|
Moves the calendar one step back (either by a month, week, or day).
|
2009-09-14 00:25:49 +02:00
|
|
|
|
2009-09-14 05:36:27 +02:00
|
|
|
**next** - .fullCalendar('next')
|
|
|
|
Moves the calendar one step forward (either by a month, week, or day).
|
2009-09-14 00:25:49 +02:00
|
|
|
|
2009-09-14 05:36:27 +02:00
|
|
|
**today** - .fullCalendar('today')
|
|
|
|
Moves the calendar to the current date.
|
2009-09-14 00:25:49 +02:00
|
|
|
|
2009-09-14 05:36:27 +02:00
|
|
|
**gotoDate** - .fullCalendar('gotoDate', *year, [month, [date]]*)
|
|
|
|
Moves the calendar to an arbitrary year/month/date.
|
2009-09-14 00:25:49 +02:00
|
|
|
|
2009-09-14 05:36:27 +02:00
|
|
|
``month`` is 0-based, meaning January=0, February=1, etc.
|
2009-09-14 00:25:49 +02:00
|
|
|
|
2009-09-14 05:36:27 +02:00
|
|
|
**moveDate** - .fullCalendar('moveDate', *years, [months, [days]]*)
|
|
|
|
Moves the calendar forward/backward an arbitrary amount of time.
|
2009-09-14 00:25:49 +02:00
|
|
|
|
2009-09-14 05:36:27 +02:00
|
|
|
**updateEvent** - .fullCalendar('updateEvent', *calEvent*)
|
|
|
|
Reports changes about a modified :ref:`CalEvent <CalEvent>`. This will cause the event
|
|
|
|
to be rerendered on the calendar.
|
|
|
|
If there are repeating events on the calendar with the
|
|
|
|
same ID, these events will be changed as well.
|
|
|
|
|
|
|
|
``calEvent`` must be a :ref:`CalEvent <CalEvent>` retrieved from a
|
|
|
|
:ref:`Triggered Action<triggered-actions>` or from the ``clientEvents`` method.
|
|
|
|
|
|
|
|
**renderEvent** - .fullCalendar('renderEvent', *calEvent, [stick]*)
|
|
|
|
Renders a new event on the calendar. ``calEvent`` must have
|
|
|
|
at least a ``title`` and a ``start``.
|
|
|
|
|
|
|
|
By default, the event will disappear once the user switches views
|
|
|
|
or clicks prev/next. However, specifying ``stick`` as ``true``
|
|
|
|
will cause the event to be permanently fixed to the calendar.
|
|
|
|
|
|
|
|
**removeEvents** - .fullCalendar('removeEvents', *[idOrFilter]*)
|
|
|
|
If the second argument is omitted, all events are removed.
|
|
|
|
If the second argument is a :ref:`CalEvent's <CalEvent>` ID, all events with
|
|
|
|
the same ID will be removed.
|
|
|
|
|
|
|
|
The second argument may also be a filter function that accepts
|
|
|
|
one :ref:`CalEvent <CalEvent>` argument and returns ``true`` or ``false`` about
|
|
|
|
whether it should be removed.
|
|
|
|
|
|
|
|
**clientEvents** - .fullCalendar('clientEvents', *[idOrFilter]*)
|
|
|
|
This method will return :ref:`CalEvents <CalEvent>` that FullCalendar has stored on
|
|
|
|
the client-side (browser).
|
|
|
|
|
|
|
|
If the second argument is omitted, all events will be returned.
|
|
|
|
If the second argument is a :ref:`CalEvent's <CalEvent>` ID, all events with the
|
|
|
|
same ID will be returned.
|
|
|
|
|
|
|
|
The second argument may also be a filter function that accepts
|
|
|
|
one :ref:`CalEvent <CalEvent>` argument and returns ``true`` or ``false`` about
|
|
|
|
whether it should be included in the result set.
|
2009-09-14 00:25:49 +02:00
|
|
|
|
2009-09-14 05:36:27 +02:00
|
|
|
**addEventSource** - .fullCalendar('addEventSource', *source*)
|
|
|
|
Adds an :ref:`Event Source <event-sources>`. ``source`` may be an array/string/function just as in
|
|
|
|
the ``events`` option. Events will be immediately fetched from this source
|
|
|
|
and placed on the calendar.
|
2009-09-14 00:25:49 +02:00
|
|
|
|
2009-09-14 05:36:27 +02:00
|
|
|
**removeEventSource** - .fullCalendar('removeEventSource', *source*)
|
|
|
|
Removes an :ref:`Event Source <event-sources>`. ``source`` must be a reference to the
|
|
|
|
original array/string/function. Events from the source will immediately be
|
|
|
|
removed from the calendar.
|
2009-09-14 00:25:49 +02:00
|
|
|
|
2009-09-14 05:36:27 +02:00
|
|
|
**rerenderEvents** - .fullCalendar(``'rerenderEvents'``)
|
|
|
|
Rerenders all events on the screen.
|
2009-09-14 00:25:49 +02:00
|
|
|
|
2009-09-14 05:36:27 +02:00
|
|
|
**refetchEvents** - .fullCalendar(``'refetchEvents'``)
|
|
|
|
Refetches events from all event sources and rerenders them on the screen.
|
|
|
|
|