This commit is contained in:
Adam Shaw
2009-09-17 06:30:10 +00:00
parent c35a4e89af
commit b3b84dca9a
21 changed files with 2590 additions and 1778 deletions
+68 -68
View File
@@ -1,69 +1,69 @@
Date Utilities
==============
**formatDate** - $.fullCalendar.formatDate(*date, formatString, [options]*)
Format a date into a string value with a specified format.
The format can be combinations of the following:
* **s** - seconds
* **ss** - seconds, 2 digits
* **m** - minutes
* **mm** - minutes, 2 digits
* **h** - hours
* **hh** - hours, 2 digits
* **H** - hours, military time
* **HH** - hours, milirary time, 2 digits
* **d** - date number
* **dd** - date number, 2 digits
* **ddd** - date name, short
* **dddd** - date name, full
* **M** - month number
* **MM** - month number, 2 digits
* **MMM** - month name, short
* **MMMM** - month name, full
* **yy** - year, 2 digits
* **yyyy** - year, 4 digits
* **t** - 'a' or 'p'
* **tt** - 'am' or 'pm'
* **T** - 'A' or 'P'
* **TT** - 'AM' or 'PM'
* **u** - ISO8601 format
* **S** - 'st', 'nd', 'rd', 'th' for the date
Special Characters:
``'...'``
literal text
``''``
single quote
``(...)``
only displays format if one of the enclosed variables is non-zero
*options* can override any of the :ref:`Locale Options<locale>`
.. _formatDates:
**formatDates** - $.fullCalendar.formatDates(*date1, date2, formatString, [options]*)
Similar to ``formatDate``, but accepts *two* dates, leveraging the following
special characters in *formatString*:
``{...}``
switches to formatting the 2nd date
``[...]``
only displays the enclosed format if the current date is different from the
alternate date in the same regards
**parseDate** - $.fullCalendar.parseDate(*string*)
Parses a string and returns a javascript Date object.
The string may be in ISO8601 format, IETF format, or a UNIX timestamp.
**parseISO8601** - $.fullCalendar.parseISO8601(*string, [ignoreTimezone]*)
Parses an ISO8601 string into a javascript Date object.
Date Utilities
==============
**formatDate** - $.fullCalendar.formatDate(*date, formatString, [options]*)
Format a date into a string value with a specified format.
The format can be combinations of the following:
* **s** - seconds
* **ss** - seconds, 2 digits
* **m** - minutes
* **mm** - minutes, 2 digits
* **h** - hours
* **hh** - hours, 2 digits
* **H** - hours, military time
* **HH** - hours, milirary time, 2 digits
* **d** - date number
* **dd** - date number, 2 digits
* **ddd** - date name, short
* **dddd** - date name, full
* **M** - month number
* **MM** - month number, 2 digits
* **MMM** - month name, short
* **MMMM** - month name, full
* **yy** - year, 2 digits
* **yyyy** - year, 4 digits
* **t** - 'a' or 'p'
* **tt** - 'am' or 'pm'
* **T** - 'A' or 'P'
* **TT** - 'AM' or 'PM'
* **u** - ISO8601 format
* **S** - 'st', 'nd', 'rd', 'th' for the date
Special Characters:
``'...'``
literal text
``''``
single quote
``(...)``
only displays format if one of the enclosed variables is non-zero
*options* can override any of the :ref:`Locale Options<locale>`
.. _formatDates:
**formatDates** - $.fullCalendar.formatDates(*date1, date2, formatString, [options]*)
Similar to ``formatDate``, but accepts *two* dates, leveraging the following
special characters in *formatString*:
``{...}``
switches to formatting the 2nd date
``[...]``
only displays the enclosed format if the current date is different from the
alternate date in the same regards
**parseDate** - $.fullCalendar.parseDate(*string*)
Parses a string and returns a javascript Date object.
The string may be in ISO8601 format, IETF format, or a UNIX timestamp.
**parseISO8601** - $.fullCalendar.parseISO8601(*string, [ignoreTimezone]*)
Parses an ISO8601 string into a javascript Date object.
+48 -48
View File
@@ -1,49 +1,49 @@
Google Calendar
===============
To integrate with your Google Calendar, you must first **make your calendar public**:
#. In the Google Calendar interface, locate the "My Calendar" box on the left.
#. Click the arrow next to the calendar you need.
#. A menu will appear. Click "Share this calendar."
#. Check "Make this calendar public."
#. Make sure "Share only my free/busy information" is *unchecked*.
#. Click "Save."
Then, you must obtain your calendar's **XML feed URL**.
#. In the Google Calendar interface, locate the "My Calendar" box on the left
#. Click the arrow next to the calendar you need.
#. A menu will appear. Click "Calendar settings."
#. In the "Calendar Address" section of the screen, click the XML badge.
#. Your feed's URL will appear.
The ``$.fullCalendar.gcalFeed`` function produces an event source that can be
passed to the ``events`` or ``eventSources`` options::
$('#calendar').fullCalendar({
events: $.fullCalendar.gcalFeed(
"http://www.google.com/calendar/feeds/...", // feed URL
{ className: 'gcal-events' } // optional options
)
});
Here is a list of available options:
* **className** - CSS class to attach to each event from this Google Calendar
* **editable** - whether to allow dragging/resizing (default: ``false``)
Google Calendar
===============
To integrate with your Google Calendar, you must first **make your calendar public**:
#. In the Google Calendar interface, locate the "My Calendar" box on the left.
#. Click the arrow next to the calendar you need.
#. A menu will appear. Click "Share this calendar."
#. Check "Make this calendar public."
#. Make sure "Share only my free/busy information" is *unchecked*.
#. Click "Save."
Then, you must obtain your calendar's **XML feed URL**.
#. In the Google Calendar interface, locate the "My Calendar" box on the left
#. Click the arrow next to the calendar you need.
#. A menu will appear. Click "Calendar settings."
#. In the "Calendar Address" section of the screen, click the XML badge.
#. Your feed's URL will appear.
The ``$.fullCalendar.gcalFeed`` function produces an event source that can be
passed to the ``events`` or ``eventSources`` options::
$('#calendar').fullCalendar({
events: $.fullCalendar.gcalFeed(
"http://www.google.com/calendar/feeds/...", // feed URL
{ className: 'gcal-events' } // optional options
)
});
Here is a list of available options:
* **className** - CSS class to attach to each event from this Google Calendar
* **editable** - whether to allow dragging/resizing (default: ``false``)
See *gcal.html* in the *examples* directory for a complete example.
+36 -36
View File
@@ -1,36 +1,36 @@
.. _locale:
Locale Options
==============
**firstDay**: Integer, *Default*: ``0``
The day-of-week each week begins. Sunday=0,
Monday=1 (for UK users), Tuesday=2, etc.
**isRTL**: Boolean, *Default*: ``false``
Displays the calendar right-to-left (for languages such as Arabic and Hebrew)
**monthNames**: Array, *Default*: ``['January','February','March'...``
Full names of months.
**monthNamesShort**: Array, *Default*: ``['Jan','Feb','Mar'...``
Abbreviated names of months.
**dayNames**: Array, *Default*: ``['Sunday','Monday','Tuesday'...``
Full names of days-of-week.
**dayNamesShort**: Array, *Default*: ``['Sun','Mon','Tue'...``
Abbreviated names of days-of-week.
**buttonText**: Object
Text that will be displayed on buttons of the header. Default::
{
prev: '&#9668;', // left triangle
next: '&#9658;', // right triangle
today: 'today',
month: 'month',
week: 'week',
day: 'day'
}
.. _locale:
Locale Options
==============
**firstDay**: Integer, *Default*: ``0``
The day-of-week each week begins. Sunday=0,
Monday=1 (for UK users), Tuesday=2, etc.
**isRTL**: Boolean, *Default*: ``false``
Displays the calendar right-to-left (for languages such as Arabic and Hebrew)
**monthNames**: Array, *Default*: ``['January','February','March'...``
Full names of months.
**monthNamesShort**: Array, *Default*: ``['Jan','Feb','Mar'...``
Abbreviated names of months.
**dayNames**: Array, *Default*: ``['Sunday','Monday','Tuesday'...``
Full names of days-of-week.
**dayNamesShort**: Array, *Default*: ``['Sun','Mon','Tue'...``
Abbreviated names of days-of-week.
**buttonText**: Object
Text that will be displayed on buttons of the header. Default::
{
prev: '&#9668;', // left triangle
next: '&#9658;', // right triangle
today: 'today',
month: 'month',
week: 'week',
day: 'day'
}
+77 -77
View File
@@ -1,78 +1,78 @@
Methods
=======
The following are methods that can be called on a FullCalendar-initialized
jQuery object:
**prev** - .fullCalendar('prev')
Moves the calendar one step back (either by a month, week, or day).
**next** - .fullCalendar('next')
Moves the calendar one step forward (either by a month, week, or day).
**today** - .fullCalendar('today')
Moves the calendar to the current date.
**gotoDate** - .fullCalendar('gotoDate', *year, [month, [date]]*)
Moves the calendar to an arbitrary year/month/date.
``month`` is 0-based, meaning January=0, February=1, etc.
**moveDate** - .fullCalendar('moveDate', *years, [months, [days]]*)
Moves the calendar forward/backward an arbitrary amount of time.
**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 calendar refetches its event
sources (example: when prev/next is clicked). 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.
**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.
**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.
**rerenderEvents** - .fullCalendar(``'rerenderEvents'``)
Rerenders all events on the screen.
**refetchEvents** - .fullCalendar(``'refetchEvents'``)
Refetches events from all event sources and rerenders them on the screen.
Methods
=======
The following are methods that can be called on a FullCalendar-initialized
jQuery object:
**prev** - .fullCalendar('prev')
Moves the calendar one step back (either by a month, week, or day).
**next** - .fullCalendar('next')
Moves the calendar one step forward (either by a month, week, or day).
**today** - .fullCalendar('today')
Moves the calendar to the current date.
**gotoDate** - .fullCalendar('gotoDate', *year, [month, [date]]*)
Moves the calendar to an arbitrary year/month/date.
``month`` is 0-based, meaning January=0, February=1, etc.
**moveDate** - .fullCalendar('moveDate', *years, [months, [days]]*)
Moves the calendar forward/backward an arbitrary amount of time.
**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 calendar refetches its event
sources (example: when prev/next is clicked). 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 an 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`` if it
should be removed.
**clientEvents** - .fullCalendar('clientEvents', *[idOrFilter]*)
This method will return an array of :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 an 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`` if it should
be included in the result set.
**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.
**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.
**rerenderEvents** - .fullCalendar(``'rerenderEvents'``)
Rerenders all events on the screen.
**refetchEvents** - .fullCalendar(``'refetchEvents'``)
Refetches events from all event sources and rerenders them on the screen.
+24 -24
View File
@@ -1,25 +1,25 @@
Theming
=======
FullCalendar can be used with jQuery UI themes. Themes provide a more stylized
look for the calendar and can easily be created using the
`jQuery UI ThemeRoller <http://jqueryui.com/themeroller/>`_.
In order for themes to work, you must include the theme's CSS file and
*fullcalendar.css* on the current page. You must also enable the ``theme`` option.
Here is the full list of theme-related options:
**theme**: Boolean, *Default*: ``false``
Enables/disables use of jQuery UI themes
**buttonIcons**: Object
Determines which icons appear within header buttons. If a button
does not have an entry, it falls back to using ``buttonText``.
Here is the default value for ``buttonIcons``::
{
prev: 'circle-triangle-w',
next: 'circle-triangle-e'
Theming
=======
FullCalendar can be used with jQuery UI themes. Themes provide a more stylized
look for the calendar and can easily be created using the
`jQuery UI ThemeRoller <http://jqueryui.com/themeroller/>`_.
In order for themes to work, you must include the theme's CSS file and
*fullcalendar.css* on the current page. You must also enable the ``theme`` option.
Here is the full list of theme-related options:
**theme**: Boolean, *Default*: ``false``
Enables/disables use of jQuery UI themes
**buttonIcons**: Object
Determines which icons appear within header buttons. If a button
does not have an entry, it falls back to using ``buttonText``.
Here is the default value for ``buttonIcons``::
{
prev: 'circle-triangle-w',
next: 'circle-triangle-e'
}