tw2.jqplugins.fullcalendar

A TW2 wrapper for the FullCalendar jquery plugin library. (see: http://arshaw.com/fullcalendar/)

FullCalendarWidget

See the FullCalendar library's documentation for fuller information: http://arshaw.com/fullcalendar/docs/

List of options passed to options parameter:

events -- calendar events [not to be confused with widget events!]

header -- (default: False) or dict()

theme -- Boolean (default: False) Enables/disables use of jQuery UI
theming
firstDay -- Integer (default=0) Date on which week begins.
Defaults to Sunday.

isRTL -- Boolean (default: False) to display in right to left mode

weekends -- Boolean (default: True) Whether to include Saturday/Sunday
columns in any of the calendar views.
weekMode -- String (default: 'fixed') Available options: 'fixed',
'liquid' or 'variable'
height -- Integer. Sets entire calendar (inc. header) pixel height.
By default, this option is unset and the calendar's height is calculated by aspectRatio
contentHeight -- Integer. Sets calendar content to pixel height.
By default, this option is unset and the calendar's height is calculated by aspectRatio
aspectRatio -- Float (default: 1.35) Determines the width-to-height
aspect ratio of the calendar

editable -- Boolean (default: False)

  • options
    • (dict) A dict of options to pass to the widget
  • events
    • (dict) (BETA) javascript callbacks for events
class BasicCalendarWidget(FullCalendarWidget):
    '''
    see source code for js functions and `calendar_events`
    '''
    attrs = {'style': 'width: 100%;'}
    options={'header': {
                'left': 'prev,next today',
                'center': 'title',
                'right': 'month,agendaWeek,agendaDay'
                },
             'events': calendar_events,
             'editable': True,
             'aspectRatio': 1.60,
             'theme': True,
             'dayClick': _day_click_js,
             'eventClick': _event_click_js,
            }
<%namespace name="tw" module="tw2.core.mako_util"/>\
<div id="${w.attrs['id']}:wrapper">
<div ${tw.attrs(attrs=w.attrs)}> </div>
<%include file="generic_jq_ui_js.mak" />
</div>