modified docs, default-ized minTime/maxTime

This commit is contained in:
Adam Shaw 2009-11-30 23:11:38 -08:00
parent 52df18a83b
commit a327fd6ab3
5 changed files with 51 additions and 7 deletions

View file

@ -122,6 +122,16 @@ Basic Options
In the agenda views, when a :ref:`CalEvent <CalEvent>` has an unspecified end date,
determines the length (in minutes) the event appears to be.
**minTime**: Integer/String, *Default*: ``0``
In the agenda views, determines the first hour/time that will be displayed, even when
the scollbars have been scrolled all the way up. This can be a number like ``5`` (which
means 5am), a string like ``'5:30'`` (which means 5:30am) or a string like ``'5:30am'``.
**maxTime**: Integer/String, *Default*: ``24``
In the agenda views, determines the last hour/time that will be displayed, even when
the scrollbars have been scrolled all the way down. This can be a number like ``22`` (which
means 10pm), a string like ``'22:30'`` (which means 10:30pm) or a string like ``'10:30pm'``.
Event Editing
=============

View file

@ -28,6 +28,16 @@ jQuery object:
Immediately switches to a different view. ``viewName`` must be one of the
:ref:`available-views`.
**getView** - .fullCalendar('getView')
Returns the :ref:`View Object <view-object>` for the current view.
This is useful if you want to get information about the calendar's title
or start/end dates.
**getDate** - .fullCalendar('getDate')
Returns a Date object for the current date of the calendar. For month view,
it will always be sometime between the first and last day of the month. For week view,
it will always be sometime between the first and last day of the week.
**updateEvent** - .fullCalendar('updateEvent', *calEvent*)
Reports changes to a :ref:`CalEvent's <CalEvent>` standard properties.
This will cause the event to be rerendered on the calendar.
@ -83,7 +93,25 @@ jQuery object:
Refetches events from all sources and rerenders them on the screen.
**render** - .fullCalendar(``'render'``)
Immediately renders the calendar. This method is automatically called if the $().fullCalendar
plugin is called on a visible element. However, if a hidden/invisible element is initialized
with FullCalendar, this method must be explicitly called as soon as the element becomes visible.
Immediately renders the calendar if is is not already visible.
If the calendar *is* already visible, readjusts its size.
This method is useful in the scenario where a tab setup might hide/show
a calendar. Call this method whenever the calendar's tab is shown.
Dynamically Getting/Setting Properties
--------------------------------------
You may dynamically *retrieve* any of a FullCalendar's options using the following form::
$('#calendar').fullCalendar('option', 'optionName'); // returns the value
You may dynamically *set* some of FullCalendar's options using the following form::
$('#calendar').fullCalendar('option', 'optionName', 'optionValue');
**HOWEVER**, setting only works for the three following options: **apsectRatio**, **contentHeight**, and **height**.
The next version of FullCalendar will have more advancements in this area.

View file

@ -44,6 +44,9 @@ always available (:ref:`more below <view-object>`).
This function is great for attaching other jQuery plugins to each event
element, such as a `qTip <http://craigsworks.com/projects/qtip/docs/>`_
tooltip effect.
**eventAfterRender**: function(calEvent, element, view)
Triggered after an event is rendered on the calendar and its position has been chosen.
**eventClick**, **eventMouseover**, **eventMouseout**: function(*calEvent, jsEvent, view*)
Triggered on click/mouseover/mouseout actions for an event.

View file

@ -14,7 +14,9 @@ setDefaults({
},
dragOpacity: {
agenda: .5
}
},
minTime: 0,
maxTime: 24
});
views.agendaWeek = function(element, options) {
@ -130,8 +132,8 @@ function Agenda(element, options, methods) {
dis = 1;
dit = 0;
}
minMinute = parseTime(options.minTime || 0);
maxMinute = parseTime(options.maxTime || 24);
minMinute = parseTime(options.minTime);
maxMinute = parseTime(options.maxTime);
var d0 = rtl ? addDays(cloneDate(view.visEnd), -1) : cloneDate(view.visStart),
d = cloneDate(d0),

View file

@ -29,7 +29,8 @@
//weekends: false,
height: 500,
//contentHeight: 500,
height: 700,
header: {