class SAPO.Component.FullCalendar
 TODO: events wrapping over (ex: several days)
 TODO: events editing via GUI?
 TODO: support for ical rules (RRULE)

 requires SAPO.Dom.Css
 requires SAPO.Dom.Element
 requires SAPO.Dom.Event
 requires SAPO.Utility.TimeEvent
 requires SAPO.Utility.TimeSlot

 requires SAPO.Utility.Debug for now...
 
Authors:
jose.p.dias AT co.sapo.pt
Version:
0.1
Since:
March 2011
Defined in Component/FullCalendar/0.1/lib.js

Property Summary

Constructor Summary
FullCalendar (String|DOMElement container, Object options)

Function Summary
addSlot (TimeSlot slot)
adds a slot to the list of events of the calendar
title
current view
next()
move to next 'page' of the current view
prev()
move to previous 'page' of the current view
render()
renders initial NTimeline
scrollView (Number numYears, Number numMonths, Number numDays)
scrolls the view any number of given units (used mostly to change year)
setView (String view)
moves calendar's current view to today

Property Details

property String version


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