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
- onColumnHeaderClick(e) Event dispatched when a column header cell is dispatched.
- onCurrentViewChange(e) Event dispatched when the current view has changed.
- onGridClick(e) Event dispatched when the grid has been clicked.
- onGridDoubleClick(e) Event dispatched when the grid has been double-clicked.
- onItemClick(e) Event dispatched when an item renderer has been clicked.
- onItemDoubleClick(e) Event dispatched when an item renderer has been double-clicked.
- onItemEditBegin(e) Event dispatched when the item is entering the editing mode.
- onItemEditBeginGesture(e) Event dispatched when an editing gesture is beginning.
- onItemEditEnd(e) Event dispatched when the item is leaving the editing mode.
- onItemEditEndGesture(e) Event dispatched at the end of an editing gesture.
- onItemEditMoveGesture(e) Event dispatched during a move editing gesture.
- onItemEditResizeGesture(e) Event dispatched during a resize editing gesture.
- onItemRollOut(e)
- onItemRollOver(e)
- onRendererCreated(renderer) Event dispatched when an item renderer has been created.
- onRendererDestroyed(renderer) Event dispatched when an item renderer is destroyed.
- onRendererRecycled(renderer) Event dispatched when an item renderer has been recycled.
- onRendererReused(renderer) Event dispatched when an item renderer that was recycled is reused.
- onRenderersLayoutDone(view) Event triggered when item renderers layout has been done.
- onRowHeaderClick(e) Event dispatched when a row header cell is clicked.
- onTimeIntervalChange(e) Event dispatched when the displayed time interval has changed.
- onViewAdded(view) Event dispatched when a view is added from the calendar.
- onViewRemoved(view) Event dispatched when a view is removed from the calendar.
Properties
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
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.
Parameter | Type | Description |
---|---|---|
startDate | Date | The start date of the displayed time interval |
endDate | Date | The end date of the displayed time interval |
duration | Integer | Duration of the return: dojox.calendar.ViewBase The view to display. |
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.
Parameter | Type | Description |
---|---|---|
view | dojox.calendar.ViewBase | The view to configure. |
index | Integer | The index of the view in the Calendar view list. |
timeInterval | Date[] | The time interval that will be displayed by the view. |
duration | Integer | The duration, in days, of the displayed time interval. |
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.
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Parameter | Type | Description |
---|---|---|
view |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Parameter | Type | Description |
---|---|---|
value |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Parameter | Type | Description |
---|---|---|
value |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Parameter | Type | Description |
---|---|---|
value |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Parameter | Type | Description |
---|---|---|
value |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Parameter | Type | Description |
---|---|---|
item | ||
renderer |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Parameter | Type | Description |
---|---|---|
value |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Parameter | Type | Description |
---|---|---|
value |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Displays the current view.
Parameter | Type | Description |
---|---|---|
oldView | dojox.calendar.ViewBase | The previously displayed view or null. |
newView | dojox.calendar.ViewBase | The view to display. |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Add a view to the calendar's view list.
Parameter | Type | Description |
---|---|---|
view | dojox.calendar.ViewBase | The view to add to the calendar. |
index | Integer | Optional, the index where to insert the view in current view list. |
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.
Parameter | Type | Description |
---|---|---|
e | Object | The column header click event. |
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.
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Set the localized labels of the buttons and the event handlers.
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Parameter | Type | Description |
---|---|---|
args | Object |
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.
Parameter | Type | Description |
---|---|---|
e |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Date
floors the date to the unit.
Parameter | Type | Description |
---|---|---|
date | Date | The date/time to floor. |
unit | String | The unit. Valid values are "minute", "hour", "day". |
steps | Integer | For "day" only 1 is valid. |
reuse | Boolean | Whether use the specified instance or create a new one. Default is false. |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Date
Floors the specified date to the start of day.
Parameter | Type | Description |
---|---|---|
date | Date | The date to floor. |
reuse | Boolean | Whether use the specified instance or create a new one. Default is false. |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Floors the specified date to the beginning of week.
date: Date
Date to floor.
Parameter | Type | Description |
---|---|---|
d |
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.
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.
Parameter | Type | Description |
---|---|---|
e |
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.
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.
Parameter | Type | Description |
---|---|---|
views |
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.
Parameter | Type | Description |
---|---|---|
item | Object | The item represented by the renderer. |
rendererKind | String | The kind of renderer. |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Boolean
Returns whether the specified item is hovered or not.
Parameter | Type | Description |
---|---|---|
item | Object | The item. |
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.
Parameter | Type | Description |
---|---|---|
item | Object | The item represented by the renderer. |
rendererKind | String | The kind of renderer. |
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.
Parameter | Type | Description |
---|---|---|
item | Object | The item represented by the renderer. |
rendererKind | String | The kind of renderer. |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Boolean
Tests if the specified date represents the starts of day.
Parameter | Type | Description |
---|---|---|
d | Date | The date to test. |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Boolean
Returns whether the specified date is in the current day.
Parameter | Type | Description |
---|---|---|
date | Date | The date to test. renderData: Object The current renderData |
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.
Parameter | Type | Description |
---|---|---|
e | Object | The row header click event. |
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.
Parameter | Type | Description |
---|---|---|
e |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Date
Creates a new Date object.
Parameter | Type | Description |
---|---|---|
obj | Object | This object can have several values: the time in milliseconds since gregorian epoch. a Date instance |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Removes a view from the calendar's view list.
Parameter | Type | Description |
---|---|---|
view | dojox.calendar.ViewBase | The view to remove from the calendar. |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
The action triggered when the today button is clicked.
By default, calls the goToday() method.
Parameter | Type | Description |
---|---|---|
e |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Parameter | Type | Description |
---|---|---|
obj | ||
stateOnly |
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.
Parameter | Type | Description |
---|---|---|
e |
Events
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when a column header cell is dispatched.
Parameter | Type | Description |
---|---|---|
e | Event | The event has the following properties: index: Integer The column index. date: Date The date displayed by the column. triggerEvent: Event The origin event. |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when the current view has changed.
Parameter | Type | Description |
---|---|---|
e | Event | Object that contains the oldView and newView properties. |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when the grid has been clicked.
Parameter | Type | Description |
---|---|---|
e |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when the grid has been double-clicked.
Parameter | Type | Description |
---|---|---|
e |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when an item renderer has been clicked.
Parameter | Type | Description |
---|---|---|
e |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when an item renderer has been double-clicked.
Parameter | Type | Description |
---|---|---|
e |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when the item is entering the editing mode.
Parameter | Type | Description |
---|---|---|
e |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when an editing gesture is beginning.
Parameter | Type | Description |
---|---|---|
e |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when the item is leaving the editing mode.
Parameter | Type | Description |
---|---|---|
e |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched at the end of an editing gesture.
Parameter | Type | Description |
---|---|---|
e |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched during a move editing gesture.
Parameter | Type | Description |
---|---|---|
e |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched during a resize editing gesture.
Parameter | Type | Description |
---|---|---|
e |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when an item renderer has been created.
Parameter | Type | Description |
---|---|---|
renderer | dojox.calendar._RendererMixin | The renderer created. |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when an item renderer is destroyed.
Parameter | Type | Description |
---|---|---|
renderer | dojox.calendar._RendererMixin | The renderer created. |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when an item renderer has been recycled.
Parameter | Type | Description |
---|---|---|
renderer | dojox.calendar._RendererMixin | The renderer created. |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when an item renderer that was recycled is reused.
Parameter | Type | Description |
---|---|---|
renderer | dojox.calendar._RendererMixin | The renderer created. |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event triggered when item renderers layout has been done.
Parameter | Type | Description |
---|---|---|
view |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when a row header cell is clicked.
Parameter | Type | Description |
---|---|---|
e |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when the displayed time interval has changed.
Parameter | Type | Description |
---|---|---|
e | Object | An event that contains the oldStartTime, startTime, oldEndTime and endTime properties. |
Defined by dijit._WidgetBase, dojox.calendar.CalendarBase
Event dispatched when a view is added from the calendar.
Parameter | Type | Description |
---|---|---|
view | dojox.calendar.ViewBase | The view that has been added to the calendar. |