class
SAPO.Component.FullCalendar
Version:
0.1
Since:
Defined in
Component/FullCalendar/0.1/lib.js
March 2011
Constructor Summary
Function Summary
addSlot
(TimeSlot
slot)
adds a slot to the list of events of the calendar
next()
move to next 'page' of the current view
prev()
move to previous 'page' of the current view
render()
renders initial NTimeline
scrolls the view any number of given units (used mostly to change year)
toToday()
moves calendar's current view to today
Constructor Details
constructor FullCalendar
FullCalendar(String|DOMElement
container, Object
options)
Parameters:
container
- block element which will be populated with the timeline
options
-
[ String cssURI ]
- URI to alternate CSS file for styling the NTimeline -
[ String calendar ]
- URI to JSON object named VCALENDAR, with an attribute VEVENT (list of objects featuring at least DTSTART, DTEND, SUMMARY (if present, LOCATION goes to the custom attribute) -
[ TimeEvent startAt ]
- date in format 'YYYY-MM-dd' defaults to today -
[ Number startDOW ]
- 0-6 defaults to monday (1) -
[ String view ]
- one of: 'list', 'day', 'week', 'month' (defaults to month) -
[ String|DOMElement titleEl ]
- element to populate with calendar title -
[ Function() onViewChanged ]
- callback that gets called every time the view changes -
[ Function(TimeSlot sl) onSlotClicked ]
- callback that returns selected event
Function Details
function addSlot
addSlot(TimeSlot
slot)
adds a slot to the list of events of the calendar
Parameters:
slot
function getTitle
String
getTitle()
title
function getView
String
getView()
current view
function next
next()
move to next 'page' of the current view
function prev
prev()
move to previous 'page' of the current view
function render
render()
renders initial NTimeline
function scrollView
scrollView(Number
numYears, Number
numMonths, Number
numDays)
scrolls the view any number of given units (used mostly to change year)
Parameters:
numYears
numMonths
numDays
function setView
setView(String
view)
Parameters:
view
- one of {"list", "day", "week", "month"} function toToday
toToday()
moves calendar's current view to today