dojox.calendar
Legend: Array Boolean Constructor Date DomNode Error Function Namespace Number Object RegExp Singleton String

dojox.calendar.CalendarBase

Object » dijit._WidgetBase » dojox.calendar.CalendarBase

This class defines a generic calendar widget that manages several views to display event in time.

dojox.calendar.StoreMixin

Property Summary

  • views The views displayed by the widget. To add/remove only one view, prefer, respectively, the addView() or removeView() methods.

Method Summary

  • _applyAttributes()
  • _computeCurrentView(startDate, endDate, duration) If the time range is lasting less than seven days returns the column view or the matrix view otherwise.
  • _computeVisibleItems(renderData) Computes the data items that are in the displayed interval.
  • _configureView(view, index, timeInterval, duration) Configures the view to show the specified time interval. This method is computing and setting the "startDate", "columnCount" for a column view, "startDate", "columnCount", "rowCount", "refStartTime" and "refEndTime" for a matrix view. This method can be extended to configure other properties like layout properties for example.
  • _createDefaultViews() Creates the default views. This method does nothing and is designed to be overridden.
  • _getCurrentViewAttr()
  • _getViewsAttr()
  • _initItems(items)
  • _navigate(dir)
  • _onViewAdded(view)
  • _onViewRemoved(view)
  • _refreshItemsRendering(renderData)
  • _setCurrentViewAttr(view)
  • _setDateAttr(value)
  • _setDateIntervalAttr(value)
  • _setDateIntervalStepsAttr(value)
  • _setEndDateAttr(value)
  • _setFirstDayOfWeekAttr(value)
  • _setHoveredItem(item, renderer)
  • _setItemsAttr(value)
  • _setStartDateAttr(value)
  • _setStoreAttr(value)
  • _setTextDirAttr(value)
  • _setViewsAttr(views)
  • _showView(oldView, newView) Displays the current view.
  • _updateItems(object, previousIndex, newIndex)
  • _validateProperties()
  • addView(view, index) Add a view to the calendar's view list.
  • buildRendering()
  • columnViewColumnHeaderClick(e) Function called when the cell of a column header of the column view is clicked. Show the time range defined by the clicked date.
  • computeTimeInterval() Computes the displayed time interval according to the date, dateInterval and dateIntervalSteps if date is not null or startDate and endDate properties otherwise.
  • configureButtons() Set the localized labels of the buttons and the event handlers.
  • constructor(args)
  • cssClassFunc() Optional function that returns a css class name to apply to item renderers that are displaying the specified item in parameter.
  • dayButtonClick(e) The action triggerred when the day button is clicked. By default, sets the dateInterval property to "day" and the "dateIntervalSteps" to 1.
  • decodeDate() An optional function to transform store date into Date objects. Default is null.
  • destroy(preserveDom)
  • encodeDate() An optional function to transform Date objects into store date. Default is null.
  • floorDate(date, unit, steps, reuse) floors the date to the unit.
  • floorToDay(date, reuse) Floors the specified date to the start of day.
  • floorToWeek(d) Floors the specified date to the beginning of week. date: Date Date to floor.
  • formatItemTimeFunc() Optional function to format the time of day of the item renderers. The function takes the date and render data object as arguments and returns a String.
  • fourDaysButtonClick(e) The action triggerred when the 4 days button is clicked. By default, sets the dateInterval property to "day" and the "dateIntervalSteps" to 4.
  • getIdentity(item)
  • goToday() Changes the displayed time interval to show the current day. Sets the date property to the current day, the dateInterval property to "day" and the "dateIntervalSteps" to 1.
  • isItemEditable(item, rendererKind) Computes whether particular item renderer can be edited. By default it is using the editable property value.
  • isItemHovered(item) Returns whether the specified item is hovered or not.
  • isItemMoveEnabled(item, rendererKind) Computes whether particular item renderer can be moved. By default it is using the moveEnabled property value.
  • isItemResizeEnabled(item, rendererKind) Computes whether particular item renderer can be resized. By default it is using the resizedEnabled property value.
  • isStartOfDay(d) Tests if the specified date represents the starts of day.
  • isToday(date) Returns whether the specified date is in the current day.
  • itemToRenderItem(item, store) Creates the render item based on the dojo.store item. It must be of the form: { id: Object, startTime: Date, endTime: Date, summary: String } By default it is building an object using the store id, the summaryAttr, startTimeAttr and endTimeAttr properties as well as decodeDate property if not null. Other fields or way to query fields can be used if needed.
  • matrixViewRowHeaderClick(e) Function called when the cell of a row header of the matrix view is clicked. If another row is already expanded, collapse it and then expand the clicked row. If the clicked row is already expadned, collapse it. If no row is expanded, expand the click row.
  • monthButtonClick(e) The action triggered when the month button is clicked. By default, sets the dateInterval property to "month" and the "dateIntervalSteps" to 1.
  • newDate(obj) Creates a new Date object.
  • nextRange()
  • postCreate()
  • previousRange()
  • refreshRendering()
  • removeView(view) Removes a view from the calendar's view list.
  • renderItemToItem(renderItem, store) Create a store item based on the render item. It must be of the form: { id: Object startTime: Date, endTime: Date, summary: String } By default it is building an object using the summaryAttr, startTimeAttr and endTimeAttr properties and decodeDate property if not null.
  • todayButtonClick(e) The action triggered when the today button is clicked. By default, calls the goToday() method.
  • updateRenderers(obj, stateOnly)
  • weekButtonClick(e) The action triggered when the week button is clicked. By default, sets the dateInterval property to "week" and the "dateIntervalSteps" to 1.

Event Summary

Attached Objects

Properties

views
Overrides dijit._WidgetBase
The views displayed by the widget. To add/remove only one view, prefer, respectively, the addView() or removeView() methods.

Methods

_applyAttributes
Overrides dijit._WidgetBase
_computeCurrentView
Overrides dijit._WidgetBase
If the time range is lasting less than seven days returns the column view or the matrix view otherwise.
ParameterTypeDescription
startDateDateThe start date of the displayed time interval
endDateDateThe end date of the displayed time interval
durationIntegerDuration of the return: dojox.calendar.ViewBase The view to display.
_computeVisibleItems
Defined by dojox.calendar.StoreMixin
Computes the data items that are in the displayed interval.
ParameterTypeDescription
renderDataObjectThe renderData that contains the start and end time of the displayed interval.
_configureView
Overrides dijit._WidgetBase
Configures the view to show the specified time interval. This method is computing and setting the "startDate", "columnCount" for a column view, "startDate", "columnCount", "rowCount", "refStartTime" and "refEndTime" for a matrix view. This method can be extended to configure other properties like layout properties for example.
ParameterTypeDescription
viewdojox.calendar.ViewBaseThe view to configure.
indexIntegerThe index of the view in the Calendar view list.
timeIntervalDate[]The time interval that will be displayed by the view.
durationIntegerThe duration, in days, of the displayed time interval.
_createDefaultViews
Overrides dijit._WidgetBase
Creates the default views. This method does nothing and is designed to be overridden.
_getCurrentViewAttr
Overrides dijit._WidgetBase
_getViewsAttr
Overrides dijit._WidgetBase
_initItems
Defined by dojox.calendar.StoreMixin
ParameterTypeDescription
items
_navigate
Overrides dijit._WidgetBase
ParameterTypeDescription
dir
_onViewAdded
Overrides dijit._WidgetBase
ParameterTypeDescription
view
_onViewRemoved
Overrides dijit._WidgetBase
ParameterTypeDescription
view
_refreshItemsRendering
Overrides dijit._WidgetBase, dojox.calendar.StoreMixin
ParameterTypeDescription
renderData
_setCurrentViewAttr
Overrides dijit._WidgetBase
ParameterTypeDescription
view
_setDateAttr
Overrides dijit._WidgetBase
ParameterTypeDescription
value
_setDateIntervalAttr
Overrides dijit._WidgetBase
ParameterTypeDescription
value
_setDateIntervalStepsAttr
Overrides dijit._WidgetBase
ParameterTypeDescription
value
_setEndDateAttr
Overrides dijit._WidgetBase
ParameterTypeDescription
value
_setFirstDayOfWeekAttr
Overrides dijit._WidgetBase
ParameterTypeDescription
value
_setHoveredItem
Overrides dijit._WidgetBase
ParameterTypeDescription
item
renderer
_setItemsAttr
Overrides dijit._WidgetBase
ParameterTypeDescription
value
_setStartDateAttr
Overrides dijit._WidgetBase
ParameterTypeDescription
value
_setStoreAttr
Defined by dojox.calendar.StoreMixin
ParameterTypeDescription
value
_setTextDirAttr
Overrides dijit._WidgetBase
ParameterTypeDescription
value
_setViewsAttr
Overrides dijit._WidgetBase
ParameterTypeDescription
views
_showView
Overrides dijit._WidgetBase
Displays the current view.
ParameterTypeDescription
oldViewdojox.calendar.ViewBaseThe previously displayed view or null.
newViewdojox.calendar.ViewBaseThe view to display.
_updateItems
Defined by dojox.calendar.StoreMixin
ParameterTypeDescription
object
previousIndex
newIndex
_validateProperties
Overrides dijit._WidgetBase
addView
Overrides dijit._WidgetBase
Add a view to the calendar's view list.
ParameterTypeDescription
viewdojox.calendar.ViewBaseThe view to add to the calendar.
indexIntegerOptional, the index where to insert the view in current view list.
buildRendering
Overrides dijit._WidgetBase
columnViewColumnHeaderClick
Overrides dijit._WidgetBase
Function called when the cell of a column header of the column view is clicked. Show the time range defined by the clicked date.
ParameterTypeDescription
eObjectThe column header click event.
computeTimeInterval
Overrides dijit._WidgetBase
Computes the displayed time interval according to the date, dateInterval and dateIntervalSteps if date is not null or startDate and endDate properties otherwise.
configureButtons
Overrides dijit._WidgetBase
Set the localized labels of the buttons and the event handlers.
constructor
Overrides dijit._WidgetBase
ParameterTypeDescription
argsObject
cssClassFunc
Defined by dojox.calendar.StoreMixin
Optional function that returns a css class name to apply to item renderers that are displaying the specified item in parameter.
dayButtonClick
Overrides dijit._WidgetBase
The action triggerred when the day button is clicked. By default, sets the dateInterval property to "day" and the "dateIntervalSteps" to 1.
ParameterTypeDescription
e
decodeDate
Defined by dojox.calendar.StoreMixin
An optional function to transform store date into Date objects. Default is null.
destroy
Overrides dijit._WidgetBase
ParameterTypeDescription
preserveDom
encodeDate
Defined by dojox.calendar.StoreMixin
An optional function to transform Date objects into store date. Default is null.
floorDate
Overrides dijit._WidgetBase
Date
floors the date to the unit.
ParameterTypeDescription
dateDateThe date/time to floor.
unitStringThe unit. Valid values are "minute", "hour", "day".
stepsIntegerFor "day" only 1 is valid.
reuseBooleanWhether use the specified instance or create a new one. Default is false.
floorToDay
Overrides dijit._WidgetBase
Date
Floors the specified date to the start of day.
ParameterTypeDescription
dateDateThe date to floor.
reuseBooleanWhether use the specified instance or create a new one. Default is false.
floorToWeek
Overrides dijit._WidgetBase
Floors the specified date to the beginning of week. date: Date Date to floor.
ParameterTypeDescription
d
formatItemTimeFunc
Overrides dijit._WidgetBase
Optional function to format the time of day of the item renderers. The function takes the date and render data object as arguments and returns a String.
fourDaysButtonClick
Overrides dijit._WidgetBase
The action triggerred when the 4 days button is clicked. By default, sets the dateInterval property to "day" and the "dateIntervalSteps" to 4.
ParameterTypeDescription
e
getIdentity
Overrides dijit._WidgetBase
ParameterTypeDescription
item
goToday
Overrides dijit._WidgetBase
Changes the displayed time interval to show the current day. Sets the date property to the current day, the dateInterval property to "day" and the "dateIntervalSteps" to 1.
isItemEditable
Overrides dijit._WidgetBase
Boolean
Computes whether particular item renderer can be edited. By default it is using the editable property value.
ParameterTypeDescription
itemObjectThe item represented by the renderer.
rendererKindStringThe kind of renderer.
isItemHovered
Overrides dijit._WidgetBase
Boolean
Returns whether the specified item is hovered or not.
ParameterTypeDescription
itemObjectThe item.
isItemMoveEnabled
Overrides dijit._WidgetBase
Boolean
Computes whether particular item renderer can be moved. By default it is using the moveEnabled property value.
ParameterTypeDescription
itemObjectThe item represented by the renderer.
rendererKindStringThe kind of renderer.
isItemResizeEnabled
Overrides dijit._WidgetBase
Boolean
Computes whether particular item renderer can be resized. By default it is using the resizedEnabled property value.
ParameterTypeDescription
itemObjectThe item represented by the renderer.
rendererKindStringThe kind of renderer.
isStartOfDay
Overrides dijit._WidgetBase
Boolean
Tests if the specified date represents the starts of day.
ParameterTypeDescription
dDateThe date to test.
isToday
Overrides dijit._WidgetBase
Boolean
Returns whether the specified date is in the current day.
ParameterTypeDescription
dateDateThe date to test. renderData: Object The current renderData
itemToRenderItem
Defined by dojox.calendar.StoreMixin
Object
Creates the render item based on the dojo.store item. It must be of the form: { id: Object, startTime: Date, endTime: Date, summary: String } By default it is building an object using the store id, the summaryAttr, startTimeAttr and endTimeAttr properties as well as decodeDate property if not null. Other fields or way to query fields can be used if needed.
ParameterTypeDescription
itemObjectThe store item.
storedojo.store.api.StoreThe store.
matrixViewRowHeaderClick
Overrides dijit._WidgetBase
Function called when the cell of a row header of the matrix view is clicked. If another row is already expanded, collapse it and then expand the clicked row. If the clicked row is already expadned, collapse it. If no row is expanded, expand the click row.
ParameterTypeDescription
eObjectThe row header click event.
monthButtonClick
Overrides dijit._WidgetBase
The action triggered when the month button is clicked. By default, sets the dateInterval property to "month" and the "dateIntervalSteps" to 1.
ParameterTypeDescription
e
newDate
Overrides dijit._WidgetBase
Date
Creates a new Date object.
ParameterTypeDescription
objObjectThis object can have several values: the time in milliseconds since gregorian epoch. a Date instance
nextRange
Overrides dijit._WidgetBase
postCreate
Overrides dijit._WidgetBase
previousRange
Overrides dijit._WidgetBase
refreshRendering
Overrides dijit._WidgetBase
removeView
Overrides dijit._WidgetBase
Removes a view from the calendar's view list.
ParameterTypeDescription
viewdojox.calendar.ViewBaseThe view to remove from the calendar.
renderItemToItem
Defined by dojox.calendar.StoreMixin
Object
Create a store item based on the render item. It must be of the form: { id: Object startTime: Date, endTime: Date, summary: String } By default it is building an object using the summaryAttr, startTimeAttr and endTimeAttr properties and decodeDate property if not null.
ParameterTypeDescription
renderItemObjectThe render item.
storedojo.store.api.StoreThe store.
todayButtonClick
Overrides dijit._WidgetBase
The action triggered when the today button is clicked. By default, calls the goToday() method.
ParameterTypeDescription
e
updateRenderers
Overrides dijit._WidgetBase
ParameterTypeDescription
obj
stateOnly
weekButtonClick
Overrides dijit._WidgetBase
The action triggered when the week button is clicked. By default, sets the dateInterval property to "week" and the "dateIntervalSteps" to 1.
ParameterTypeDescription
e

Events

onColumnHeaderClick
Overrides dijit._WidgetBase
Event dispatched when a column header cell is dispatched.
ParameterTypeDescription
eEventThe event has the following properties: index: Integer The column index. date: Date The date displayed by the column. triggerEvent: Event The origin event.
onCurrentViewChange
Overrides dijit._WidgetBase
Event dispatched when the current view has changed.
ParameterTypeDescription
eEventObject that contains the oldView and newView properties.
onGridClick
Overrides dijit._WidgetBase
Event dispatched when the grid has been clicked.
ParameterTypeDescription
e
onGridDoubleClick
Overrides dijit._WidgetBase
Event dispatched when the grid has been double-clicked.
ParameterTypeDescription
e
onItemClick
Overrides dijit._WidgetBase
Event dispatched when an item renderer has been clicked.
ParameterTypeDescription
e
onItemDoubleClick
Overrides dijit._WidgetBase
Event dispatched when an item renderer has been double-clicked.
ParameterTypeDescription
e
onItemEditBegin
Overrides dijit._WidgetBase
Event dispatched when the item is entering the editing mode.
ParameterTypeDescription
e
onItemEditBeginGesture
Overrides dijit._WidgetBase
Event dispatched when an editing gesture is beginning.
ParameterTypeDescription
e
onItemEditEnd
Overrides dijit._WidgetBase
Event dispatched when the item is leaving the editing mode.
ParameterTypeDescription
e
onItemEditEndGesture
Overrides dijit._WidgetBase
Event dispatched at the end of an editing gesture.
ParameterTypeDescription
e
onItemEditMoveGesture
Overrides dijit._WidgetBase
Event dispatched during a move editing gesture.
ParameterTypeDescription
e
onItemEditResizeGesture
Overrides dijit._WidgetBase
Event dispatched during a resize editing gesture.
ParameterTypeDescription
e
onItemRollOut
Overrides dijit._WidgetBase
ParameterTypeDescription
e
onItemRollOver
Overrides dijit._WidgetBase
ParameterTypeDescription
e
onRendererCreated
Overrides dijit._WidgetBase
Event dispatched when an item renderer has been created.
ParameterTypeDescription
rendererdojox.calendar._RendererMixinThe renderer created.
onRendererDestroyed
Overrides dijit._WidgetBase
Event dispatched when an item renderer is destroyed.
ParameterTypeDescription
rendererdojox.calendar._RendererMixinThe renderer created.
onRendererRecycled
Overrides dijit._WidgetBase
Event dispatched when an item renderer has been recycled.
ParameterTypeDescription
rendererdojox.calendar._RendererMixinThe renderer created.
onRendererReused
Overrides dijit._WidgetBase
Event dispatched when an item renderer that was recycled is reused.
ParameterTypeDescription
rendererdojox.calendar._RendererMixinThe renderer created.
onRenderersLayoutDone
Overrides dijit._WidgetBase
Event triggered when item renderers layout has been done.
ParameterTypeDescription
view
onRowHeaderClick
Overrides dijit._WidgetBase
Event dispatched when a row header cell is clicked.
ParameterTypeDescription
e
onTimeIntervalChange
Overrides dijit._WidgetBase
Event dispatched when the displayed time interval has changed.
ParameterTypeDescription
eObjectAn event that contains the oldStartTime, startTime, oldEndTime and endTime properties.
onViewAdded
Overrides dijit._WidgetBase
Event dispatched when a view is added from the calendar.
ParameterTypeDescription
viewdojox.calendar.ViewBaseThe view that has been added to the calendar.
onViewRemoved
Overrides dijit._WidgetBase
Event dispatched when a view is removed from the calendar.
ParameterTypeDescription
viewdojox.calendar.ViewBaseThe view that has been removed from the calendar.