weekNumbers, weekNumberTitle, weekNumberCalculation, W formatter, eventTransform, dayRender, snapMinutes

This commit is contained in:
Adam Shaw
2013-03-16 16:59:31 -07:00
parent 603ec851ba
commit d98ca011a8
12 changed files with 106 additions and 0 deletions
+1
View File
@@ -8,6 +8,7 @@ The following options only apply to the `agendaWeek` and `agendaDay` views:
- allDayText
- axisFormat
- slotMinutes
- snapMinutes
- defaultEventMinutes
- firstHour
- minTime
+12
View File
@@ -0,0 +1,12 @@
snapMinutes *1.6*
=================
The time interval at which a dragged event will snap to the agenda view time grid.
Specified in number of minutes.
<div class='spec' markdown='1'>
Integer
</div>
The default value will be whatever [slotMinutes]() is, which defaults to `30` (half an hour).
+19
View File
@@ -0,0 +1,19 @@
dayRender *1.6*
===============
A hook for modifying a day cell.
<div class='spec' markdown='1'>
function( date, cell ) { }
</div>
This callback lets you modify day cells that are part of the *month*, *basicWeek*, and *basicDay* views.
See [Available Views](http://localhost/arshaw/fullcalendar/docs/views/Available_Views/).
`date` is the native Date object for the given day.
You cannot return a new element. You must only modify the `cell` (a `<td>` element) that is provided.
This callback is called each time a cell needs to be freshly rendered. However, a cell does not need to
be rerendered when switching views. Rendering only occurs when the calendar navigates to a different date/time.
+3
View File
@@ -10,11 +10,14 @@ General Display
<li>isRTL</li>
<li>weekends</li>
<li>weekMode</li>
<li>weekNumbers</li>
<li>weekNumberCalculation</li>
<li>height</li>
<li>contentHeight</li>
<li>aspectRatio</li>
<li class='callback'><a href='viewDisplay'>viewDisplay</a> <em>(callback)</em></li>
<li class='callback'><a href='windowResize'>windowResize</a> <em>(callback)</em></li>
<li class='callback'><a href='dayRender'>dayRender</a> <em>(callback)</em></li>
<li class='method'><a href='render'>render</a> <em>(method)</em></li>
<li class='method'><a href='destroy'>destroy</a> <em>(method)</em></li>
</ul>
+16
View File
@@ -0,0 +1,16 @@
weekNumberCalculation *1.6*
===========================
The method for calculating week numbers that are displayed with the [weekNumbers](weekNumbers) setting.
<div class='spec' markdown='1'>
String/Function, *default*:`"iso"`
</div>
The default (`"iso"`) causes
[ISO8601 week numbers](http://en.wikipedia.org/wiki/ISO_8601#Week_dates).
You may also specify a function, which accepts a single native Date object and returns
an integer week number. Since FullCalendar currently lacks a built-in internationlization
system, this is only way to implement localized week numbers.
+15
View File
@@ -0,0 +1,15 @@
weekNumbers *1.6*
=================
Determines if week numbers should be displayed on the calendar.
<div class='spec' markdown='1'>
Boolean, *default*: `false`
</div>
If set to `true`, week numbers will be displayed in a separate left column in the month/basic views
as well as at the top-left corner of the agenda views. See [Available Views](../views/Available_Views).
By defaut, FullCalendar will display the [ISO8601 week number](http://en.wikipedia.org/wiki/ISO_8601#Week_dates).
To display other types of week numbers, see [weekNumberCalculation](weekNumberCalculation).
+8
View File
@@ -125,6 +125,14 @@ ignoreTimezone
Sets the [ignoreTimezone]() option, but only for this source.
</td>
</tr>
<tr>
<th>
eventTransform
</th>
<td markdown='1'>
Sets the [eventTransform]() callback, but only for this source.
</td>
</tr>
</table>
**For JSON feeds**, [there are additional options you can set](events_json_feed#options).
+17
View File
@@ -0,0 +1,17 @@
eventTransform *1.6*
====================
Transforms custom data into a standard [Event Object](Event_Object).
<div class='spec' markdown='1'>
function( *eventData* ) {}
</div>
This hook allows you to receive arbitrary event data from a JSON feed or any other
[Event Source](Event_Source_Object) and transform it into the type of data FullCalendar accepts.
This let's you easily accept alternative data formats without having to write a completely custom
[events function](events_function).
This function is called once per received event. `eventData` is the event data that has been
receieved. The function must return a new object in the [Event Object](Event_Object) format.
+1
View File
@@ -14,6 +14,7 @@ Event Data
<li>startParam</li>
<li>endParam</li>
<li>lazyFetching</li>
<li class='callback'><a href='eventTransform'>eventTransform</a> <em>(callback)</em></li>
<li class='callback'><a href='loading'>loading</a> <em>(callback)</em></li>
<li class='method'><a href='updateEvent'>updateEvent</a> <em>(method)</em></li>
<li class='method'><a href='clientEvents'>clientEvents</a> <em>(method)</em></li>
+1
View File
@@ -11,6 +11,7 @@ Text/Time Customization
<li>monthNamesShort</li>
<li>dayNames</li>
<li>dayNamesShort</li>
<li>weekNumberTitle</li>
</ul>
Related agenda options: [allDayText](../agenda/allDayText), [axisFormat](../agenda/axisFormat)
+12
View File
@@ -0,0 +1,12 @@
weekNumberTitle *1.6*
=====================
The heading text for week numbers.
<div class='spec' markdown='1'>
String, *default*: `"W"`
</div>
This text will go above the week number column in the month/basic views.
It will go alongside the week number text in the top-left cell for agenda views.
+1
View File
@@ -36,6 +36,7 @@ Prior to version 1.3, formatDate accepted a very different format. [See here](fo
- **TT** - 'AM' or 'PM'
- **u** - ISO8601 format
- **S** - 'st', 'nd', 'rd', 'th' for the date
- **W** - the [ISO8601 week number](http://en.wikipedia.org/wiki/ISO_8601#Week_dates)
Special Characters: