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

dojox.calendar.Calendar

Object » dijit._WidgetBase » dojox.calendar.CalendarBase » dojox.calendar.Calendar
dojo.require("dojox.calendar.Calendar");
Defined in dojox.calendar/Calendar.js

This class defines a calendar widget that display events in time.

dojox.calendar.CalendarBase

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.
  • _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: A ColumnView instance used to display one day to seven days time intervals, A MatrixView instance used to display the other time intervals. The views are mixed with Mouse and Keyboard to allow editing items using mouse and keyboard.
  • _getCurrentViewAttr()
  • _getViewsAttr()
  • _navigate(dir)
  • _onViewAdded(view)
  • _onViewRemoved(view)
  • _refreshItemsRendering()
  • _setCurrentViewAttr(view)
  • _setDateAttr(value)
  • _setDateIntervalAttr(value)
  • _setDateIntervalStepsAttr(value)
  • _setEndDateAttr(value)
  • _setFirstDayOfWeekAttr(value)
  • _setHoveredItem(item, renderer)
  • _setItemsAttr(value)
  • _setStartDateAttr(value)
  • _setTextDirAttr(value)
  • _setViewsAttr(views)
  • _showView(oldView, newView) Displays the current view.
  • _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)
  • dayButtonClick(e) The action triggerred when the day button is clicked. By default, sets the dateInterval property to "day" and the "dateIntervalSteps" to 1.
  • destroy(preserveDom)
  • 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.
  • installDefaultViewsActions(views) Installs the default actions on newly created default views. By default this action is registering: the matrixViewRowHeaderClick method on the rowHeaderClick event of the matrix view. the columnViewColumnHeaderClick method on the columnHeaderClick event of the column view.
  • 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.
  • 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.
  • 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

Properties

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

Methods

_applyAttributes
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
_computeCurrentView
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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.
_configureView
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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, dojox.calendar.CalendarBase
Creates the default views: A ColumnView instance used to display one day to seven days time intervals, A MatrixView instance used to display the other time intervals. The views are mixed with Mouse and Keyboard to allow editing items using mouse and keyboard.
_getCurrentViewAttr
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
_getViewsAttr
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
_navigate
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
dir
_onViewAdded
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
view
_onViewRemoved
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
view
_refreshItemsRendering
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
_setCurrentViewAttr
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
view
_setDateAttr
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
value
_setDateIntervalAttr
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
value
_setDateIntervalStepsAttr
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
value
_setEndDateAttr
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
value
_setFirstDayOfWeekAttr
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
value
_setHoveredItem
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
item
renderer
_setItemsAttr
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
value
_setStartDateAttr
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
value
_setTextDirAttr
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
value
_setViewsAttr
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
views
_showView
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Displays the current view.
ParameterTypeDescription
oldViewdojox.calendar.ViewBaseThe previously displayed view or null.
newViewdojox.calendar.ViewBaseThe view to display.
_validateProperties
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
addView
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
columnViewColumnHeaderClick
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Computes the displayed time interval according to the date, dateInterval and dateIntervalSteps if date is not null or startDate and endDate properties otherwise.
configureButtons
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Set the localized labels of the buttons and the event handlers.
constructor
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
argsObject
dayButtonClick
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
The action triggerred when the day button is clicked. By default, sets the dateInterval property to "day" and the "dateIntervalSteps" to 1.
ParameterTypeDescription
e
destroy
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
preserveDom
floorDate
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Floors the specified date to the beginning of week. date: Date Date to floor.
ParameterTypeDescription
d
formatItemTimeFunc
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
item
goToday
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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.
installDefaultViewsActions
Installs the default actions on newly created default views. By default this action is registering: the matrixViewRowHeaderClick method on the rowHeaderClick event of the matrix view. the columnViewColumnHeaderClick method on the columnHeaderClick event of the column view.
ParameterTypeDescription
views
isItemEditable
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Boolean
Returns whether the specified item is hovered or not.
ParameterTypeDescription
itemObjectThe item.
isItemMoveEnabled
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Boolean
Tests if the specified date represents the starts of day.
ParameterTypeDescription
dDateThe date to test.
isToday
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Boolean
Returns whether the specified date is in the current day.
ParameterTypeDescription
dateDateThe date to test. renderData: Object The current renderData
matrixViewRowHeaderClick
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Date
Creates a new Date object.
ParameterTypeDescription
objObjectThis object can have several values: the time in milliseconds since gregorian epoch. a Date instance
nextRange
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
postCreate
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
previousRange
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
refreshRendering
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
removeView
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Removes a view from the calendar's view list.
ParameterTypeDescription
viewdojox.calendar.ViewBaseThe view to remove from the calendar.
todayButtonClick
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
The action triggered when the today button is clicked. By default, calls the goToday() method.
ParameterTypeDescription
e
updateRenderers
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
obj
stateOnly
weekButtonClick
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
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
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when the current view has changed.
ParameterTypeDescription
eEventObject that contains the oldView and newView properties.
onGridClick
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when the grid has been clicked.
ParameterTypeDescription
e
onGridDoubleClick
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when the grid has been double-clicked.
ParameterTypeDescription
e
onItemClick
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when an item renderer has been clicked.
ParameterTypeDescription
e
onItemDoubleClick
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when an item renderer has been double-clicked.
ParameterTypeDescription
e
onItemEditBegin
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when the item is entering the editing mode.
ParameterTypeDescription
e
onItemEditBeginGesture
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when an editing gesture is beginning.
ParameterTypeDescription
e
onItemEditEnd
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when the item is leaving the editing mode.
ParameterTypeDescription
e
onItemEditEndGesture
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched at the end of an editing gesture.
ParameterTypeDescription
e
onItemEditMoveGesture
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched during a move editing gesture.
ParameterTypeDescription
e
onItemEditResizeGesture
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched during a resize editing gesture.
ParameterTypeDescription
e
onItemRollOut
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
e
onItemRollOver
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
ParameterTypeDescription
e
onRendererCreated
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when an item renderer has been created.
ParameterTypeDescription
rendererdojox.calendar._RendererMixinThe renderer created.
onRendererDestroyed
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when an item renderer is destroyed.
ParameterTypeDescription
rendererdojox.calendar._RendererMixinThe renderer created.
onRendererRecycled
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when an item renderer has been recycled.
ParameterTypeDescription
rendererdojox.calendar._RendererMixinThe renderer created.
onRendererReused
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when an item renderer that was recycled is reused.
ParameterTypeDescription
rendererdojox.calendar._RendererMixinThe renderer created.
onRenderersLayoutDone
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event triggered when item renderers layout has been done.
ParameterTypeDescription
view
onRowHeaderClick
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when a row header cell is clicked.
ParameterTypeDescription
e
onTimeIntervalChange
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when the displayed time interval has changed.
ParameterTypeDescription
eObjectAn event that contains the oldStartTime, startTime, oldEndTime and endTime properties.
onViewAdded
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when a view is added from the calendar.
ParameterTypeDescription
viewdojox.calendar.ViewBaseThe view that has been added to the calendar.
onViewRemoved
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when a view is removed from the calendar.
ParameterTypeDescription
viewdojox.calendar.ViewBaseThe view that has been removed from the calendar.