dojox/calendar/Calendar (version 1.10)

dojox/calendar/CalendarBase

Usage

var foo = new Calendar(args);
dojox/calendar/CalendarBase
Parameter Type Description
args Object

See the dojox/calendar/Calendar reference documentation for more information.

Property Summary

  • _animRangeOutDir
  • _attachEventsList of connections associated with data-dojo-attach-event=... in the template
  • _attachPointsList of widget attribute names associated with data-dojo-attach-point=... in the template, ex: ["containerNode", "labelNode"]
  • _attrPairNames
  • _blankGifPath to a blank 1x1 image.
  • _calendar
  • _currentViewIndex
  • _earlyTemplatedStartupA fallback to preserve the 1.0 - 1.3 behavior of children in templates having their startup called before the parent widget fires postCreate.
  • _renderedNot normally use, but this flag can be set by the app if the server has already rendered the template, i.e. already inlining the template for the widget into the main page.
  • _setClassAttr
  • _setDirAttr
  • _setIdAttr
  • _setLangAttr
  • _setTypeAttr
  • _skipNodeCache
  • _startedstartup() has completed.
  • _timeInterval
  • allDayAttrThe attribute of the store item that contains the all day state of the events represented by this item.
  • animateRangeIndicates that the previous/next range method will be animated.
  • animationRangeDurationThe duration of the next/previous range animation.
  • attachScopeObject to which attach points and events will be scoped.
  • attributeMapDeprecated.
  • baseClass
  • class
  • columnViewThe column view is displaying one day to seven days time intervals.
  • columnViewPropsMap of property/value passed to the constructor of the column view.
  • containerNodeDesignates where children of the source DOM node will be placed. "Children" in this case refers to both DOM nodes and widgets.
  • contextRequireUsed to provide a context require to the dojo/parser in order to be able to use relative MIDs (e.g. ./Widget) in the widget's template.
  • createItemFuncA user supplied function that creates a new event.
  • createOnGridClickIndicates whether the user can create new event by clicking and dragging the grid.
  • cssClassFuncOptional function that returns a css class name to apply to item renderers that are displaying the specified item in parameter.
  • currentViewThe current view displayed by the Calendar object.
  • dateThe reference date used to determine along with the dateInterval and dateIntervalSteps properties the time interval to display.
  • dateIntervalThe date interval used to compute along with the date and dateIntervalSteps the time interval to display.
  • dateIntervalStepsThe number of date intervals used to compute along with the date and dateInterval the time interval to display.
  • datePackageJavaScript namespace to find Calendar routines.
  • decodeDateAn optional function to transform store date into Date objects.
  • dirBi-directional support, as defined by the HTML DIR attribute.
  • displayedItemsInvalidatedWhether the data items displayed must be recomputed, usually after the displayed time range has changed.
  • domNodeThis is our visible representation of the widget!
  • editableA flag that indicates whether or not the user can edit items in the data provider.
  • encodeDateAn optional function to transform Date objects into store date.
  • endDateThe end date of the displayed time interval (included).
  • endTimeAttrThe attribute of the store item that contains the end time of the events represented by this item.
  • firstDayOfWeek(Optional) The first day of week override.
  • focusedThis widget or a widget it contains has focus, or is "active" because it was recently clicked.
  • formatItemTimeFuncOptional function to format the time of day of the item renderers.
  • hoveredItemCurrent render item which is under the mouse cursor.
  • idA unique, opaque ID string that can be assigned by users or by the system.
  • invalidatingProperties
  • invalidRendering
  • langRarely used.
  • matrixViewThe column view is displaying time intervals that lasts more than seven days.
  • matrixViewPropsMap of property/value passed to the constructor of the matrix view.
  • maxDateThe maximum date.
  • minDateThe minimum date.
  • moveEnabledA flag that indicates whether the user can move items displayed.
  • ownerDocumentThe document this widget belongs to.
  • queryA query that can be passed to when querying the store.
  • queryOptionsOptions to be applied when querying the store.
  • resizeEnabledA flag that indicates whether the items can be resized.
  • searchContainerNode
  • selectedItemIn single selection mode, the selected item or in multiple selection mode the last selected item.
  • selectedItemsThe list of selected items.
  • selectionModeValid values are: "none": No selection can be done. "single": Only one item can be selected at a time. "multiple": Several item can be selected using the control key modifier.
  • srcNodeRefpointer to original DOM node
  • startDateThe start date of the displayed time interval.
  • startTimeAttrThe attribute of the store item that contains the start time of the events represented by this item.
  • storeThe store that contains the events to display.
  • styleHTML style attributes as cssText string or name/value hash
  • subColumnAttrThe attribute of the store item that contains the sub column name of the events represented by this item.
  • summaryAttrThe attribute of the store item that contains the summary of the events represented by this item.
  • templatePathPath to template (HTML file) for this widget relative to dojo.baseUrl.
  • templateString
  • titleHTML title attribute.
  • tooltipWhen this widget's title attribute is used to for a tab label, accordion pane title, etc., this specifies the tooltip to appear when the mouse is hovered over that text.
  • viewChangeDuration
  • viewContainerThe DOM node that will contains the views.
  • viewsThe views displayed by the widget.
  • widgetsInTemplateShould we parse the template to find widgets that might be declared in markup inside it? (Remove for 2.0 and assume true)

Method Summary

  • _animateRange(node,toLeft,fadeIn,xFrom,xTo,onEnd) Animates the current view using a synchronous fade and horizontal translation.
  • _applyAttributes()
  • _applyViewChange(view,index,timeInterval,duration) Applies the changes of a view time and changes the currently visible view if needed.
  • _attach(node,type,func) Roughly corresponding to dojo/on, this is the default function for processing a data-dojo-attach-event.
  • _attachTemplateNodes(rootNode) Iterate through the dom nodes and attach functions and nodes accordingly.
  • _attrToDom(attr,value,commands) Reflect a widget attribute (title, tabIndex, duration etc.) to the widget DOM, as specified by commands parameter.
  • _beforeFillContent()
  • _changeAttrValue(name,value) Internal helper for directly changing an attribute value.
  • _cleanItemStoreState(id)
  • _computeCurrentView(startDate,endDate,duration) If the time range is lasting less than seven days returns the column view or the matrix view otherwise.
  • _computeTimeIntervalImpl(d) Computes the displayed time interval according to the date, dateInterval and dateIntervalSteps if date is not null or startDate and endDate properties 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.
  • _createDefaultViews() Creates the default views: - A dojox.calendar.ColumnView instance used to display one day to seven days time intervals, - A dojox.calendar.MatrixView instance used to display the other time intervals.
  • _detachTemplateNodes() Detach and clean up the attachments made in _attachtempalteNodes.
  • _escapeValue(val) Escape a value to be inserted into the template, either into an attribute value (ex: foo="${bar}") or as inner text of an element (ex: ${foo})
  • _fillContent(source) Relocate source contents to templated container node. this.containerNode must be able to receive children, or exceptions will be thrown.
  • _get(name) Helper function to get value for specified property stored by this._set(), i.e. for properties with custom setters.
  • _getAttrNames(name) Helper function for get() and set().
  • _getCurrentViewAttr()
  • _getItemStoreStateObj(item)
  • _getSelectedItemsAttr()
  • _getViewsAttr()
  • _initItems(items)
  • _introspect() Collect metadata about this widget (only once per class, not once per instance): - list of attributes with custom setters, storing in this.constructor._setterAttrs - generate this.constructor._onMap, mapping names like "mousedown" to functions like onMouseDown
  • _navigate(dir)
  • _performViewTransition(view,index,timeInterval,duration)
  • _processTemplateNode(baseNode,getAttrFunc,attachFunc) Process data-dojo-attach-point and data-dojo-attach-event for given node or widget.
  • _refreshDecorationItemsRendering()
  • _refreshItemsRendering()
  • _set(name,value) Helper function to set new value for specified property, and call handlers registered with watch() if the value has changed.
  • _setCurrentViewAttr(view)
  • _setDateAttr(value)
  • _setDateIntervalAttr(value)
  • _setDateIntervalStepsAttr(value)
  • _setDecorationItemsAttr(value)
  • _setDecorationStoreAttr(value)
  • _setEndDateAttr(value)
  • _setFirstDayOfWeekAttr(value)
  • _setHoveredItem(item,renderer)
  • _setItemsAttr(value)
  • _setItemStoreState(item,state)
  • _setOwnerDocumentAttr(val)
  • _setSelectedItemAttr(value)
  • _setSelectedItemsAttr(value)
  • _setSelectionModeAttr(value)
  • _setStartDateAttr(value)
  • _setStoreAttr(value)
  • _setStyleAttr(value) Sets the style attribute of the widget according to value, which is either a hash like {height: "5px", width: "3px"} or a plain string
  • _setTextDirAttr(value)
  • _setViewsAttr(views)
  • _showView(oldView,newView) Displays the current view.
  • _stringRepl(tmpl) Does substitution of ${foo} type properties in template string
  • _validateProperties()
  • addInvalidatingProperties(properties) Add properties to the watched properties to trigger invalidation.
  • 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.
  • computeTimeInterval()
  • configureButtons() Set the localized labels of the buttons and the event handlers.
  • connect(obj,event,method) Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead.
  • create(params,srcNodeRef) Kick off the life-cycle of a widget
  • dayButtonClick(e) The action triggerred when the day button is clicked.
  • defer(fcn,delay) Wrapper to setTimeout to avoid deferred functions executing after the originating widget has been destroyed.
  • destroy(preserveDom) Destroy this widget, but not its descendants.
  • destroyDescendants(preserveDom) Recursively destroy the children of this widget and their descendants.
  • destroyRecursive(preserveDom) Destroy this widget and its descendants
  • destroyRendering(preserveDom) Destroys the DOM nodes associated with this widget.
  • disconnect(handle) Deprecated, will be removed in 2.0, use handle.remove() instead.
  • dispatchChange(oldSelectedItem,newSelectedItem,renderer,triggerEvent) Dispatch a selection change event.
  • emit(type,eventObj,callbackArgs) Used by widgets to signal that a synthetic event occurred, ex: myWidget.emit("attrmodified-selectedChildWidget", {}).
  • 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.
  • fourDaysButtonClick(e) The action triggerred when the 4 days button is clicked.
  • get(name) Get a property from a widget.
  • getChildren() Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent is this widget.
  • getIdentity(item)
  • getItemStoreState(item) Returns the creation state of an item.
  • getParent() Returns the parent widget of this widget.
  • goToday() Changes the displayed time interval to show the current day.
  • installDefaultViewsActions(views) Installs the default actions on newly created default views.
  • invalidateRendering() Invalidating the rendering for the next executation frame.
  • isFocusable() Return true if this widget can currently be focused and false if not
  • isItemEditable(item,rendererKind) Computes whether particular item renderer can be edited.
  • isItemHovered(item) Returns whether the specified item is hovered or not.
  • isItemMoveEnabled(item,rendererKind) Computes whether particular item renderer can be moved.
  • isItemResizeEnabled(item,rendererKind) Computes whether particular item renderer can be resized.
  • isItemSelected(item) Returns whether an item is selected or not.
  • isLeftToRight() Return this widget's explicit or implicit orientation (true for LTR, false for RTL)
  • isOverlapping(renderData,start1,end1,start2,end2,includeLimits) Computes if the first time range defined by the start1 and end1 parameters is overlapping the second time range defined by the start2 and end2 parameters.
  • 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.
  • matrixViewRowHeaderClick(e) Function called when the cell of a row header of the matrix view is clicked.
  • monthButtonClick(e) The action triggered when the month button is clicked.
  • newDate(obj) Creates a new Date object.
  • nextRange()
  • on(type,func) Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }).
  • own() Track specified handles and remove/destroy them when this instance is destroyed, unless they were already removed/destroyed manually.
  • placeAt(reference,position) Place this widget somewhere in the DOM based on standard domConstruct.place() conventions.
  • postCreate()
  • postMixInProperties() Called after the parameters to the widget have been read-in, but before the widget template is instantiated.
  • postscript(params,srcNodeRef) Kicks off widget instantiation.
  • previousRange()
  • refreshRendering() Refreshes all the visual rendering of the calendar.
  • removeView(view) Removes a view from the calendar's view list.
  • renderItemToItem(renderItem,store) Create a store item based on the render item.
  • resize(changeSize)
  • selectFromEvent(e,item,renderer,dispatch) Applies selection triggered by an user interaction
  • set(name,value) Set a property on a widget
  • setItemSelected(item,value) Change the selection state of an item.
  • startup() Processing after the DOM fragment is added to the document
  • subscribe(t,method) Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead.
  • todayButtonClick(e) The action triggered when the today button is clicked.
  • toString() Returns a string that represents the widget.
  • uninitialize() Deprecated.
  • unsubscribe(handle) Deprecated, will be removed in 2.0, use handle.remove() instead.
  • updateRenderers(obj,stateOnly)
  • validateRendering() Immediately validate the rendering if it has been invalidated.
  • watch(name,callback) Watches a property for changes
  • weekButtonClick(e) The action triggered when the week button is clicked.

Event Summary

Properties

_animRangeOutDir
_attachEvents
Defined by: dijit/_AttachMixin

List of connections associated with data-dojo-attach-event=... in the template

_attachPoints
Defined by: dijit/_AttachMixin

List of widget attribute names associated with data-dojo-attach-point=... in the template, ex: ["containerNode", "labelNode"]

_attrPairNames
Defined by: dijit/_WidgetBase
_blankGif
Defined by: dijit/_WidgetBase

Path to a blank 1x1 image. Used by <img> nodes in templates that really get their image via CSS background-image.

_calendar
_currentViewIndex
_earlyTemplatedStartup

A fallback to preserve the 1.0 - 1.3 behavior of children in templates having their startup called before the parent widget fires postCreate. Defaults to 'false', causing child widgets to have their .startup() called immediately before a parent widget .startup(), but always after the parent .postCreate(). Set to 'true' to re-enable to previous, arguably broken, behavior.

_rendered
Defined by: dijit/_TemplatedMixin

Not normally use, but this flag can be set by the app if the server has already rendered the template, i.e. already inlining the template for the widget into the main page. Reduces _TemplatedMixin to just function like _AttachMixin.

_setClassAttr
Defined by: dijit/_WidgetBase
_setDirAttr
Defined by: dijit/_WidgetBase
_setIdAttr
Defined by: dijit/_WidgetBase
_setLangAttr
Defined by: dijit/_WidgetBase
_setTypeAttr
Defined by: dijit/_WidgetBase
_skipNodeCache
Defined by: dijit/_TemplatedMixin
_started
Defined by: dijit/_WidgetBase

startup() has completed.

_timeInterval
allDayAttr

The attribute of the store item that contains the all day state of the events represented by this item. Default is "allDay".

animateRange

Indicates that the previous/next range method will be animated.

animationRangeDuration

The duration of the next/previous range animation.

attachScope
Defined by: dijit/_AttachMixin

Object to which attach points and events will be scoped. Defaults to 'this'.

attributeMap
Defined by: dijit/_WidgetBase

Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute for each XXX attribute to be mapped to the DOM.

attributeMap sets up a "binding" between attributes (aka properties) of the widget and the widget's DOM. Changes to widget attributes listed in attributeMap will be reflected into the DOM.

For example, calling set('title', 'hello') on a TitlePane will automatically cause the TitlePane's DOM to update with the new title.

attributeMap is a hash where the key is an attribute of the widget, and the value reflects a binding to a:

  • DOM node attribute

    focus: {node: "focusNode", type: "attribute"} Maps this.focus to this.focusNode.focus

  • DOM node innerHTML

    title: { node: "titleNode", type: "innerHTML" } Maps this.title to this.titleNode.innerHTML

  • DOM node innerText

    title: { node: "titleNode", type: "innerText" } Maps this.title to this.titleNode.innerText

  • DOM node CSS class

    myClass: { node: "domNode", type: "class" } Maps this.myClass to this.domNode.className

If the value is an array, then each element in the array matches one of the formats of the above list.

There are also some shorthands for backwards compatibility:

  • string --> { node: string, type: "attribute" }, for example:
"focusNode" ---> { node: "focusNode", type: "attribute" }
  • "" --> { node: "domNode", type: "attribute" }
baseClass
class
Defined by: dijit/_WidgetBase
columnView

The column view is displaying one day to seven days time intervals.

columnViewProps

Map of property/value passed to the constructor of the column view.

containerNode
Defined by: dijit/_WidgetBase

Designates where children of the source DOM node will be placed. "Children" in this case refers to both DOM nodes and widgets. For example, for myWidget:

<div data-dojo-type=myWidget>
    <b> here's a plain DOM node
    <span data-dojo-type=subWidget>and a widget</span>
    <i> and another plain DOM node </i>
</div>

containerNode would point to:

<b> here's a plain DOM node
<span data-dojo-type=subWidget>and a widget</span>
<i> and another plain DOM node </i>

In templated widgets, "containerNode" is set via a data-dojo-attach-point assignment.

containerNode must be defined for any widget that accepts innerHTML (like ContentPane or BorderContainer or even Button), and conversely is null for widgets that don't, like TextBox.

contextRequire

Used to provide a context require to the dojo/parser in order to be able to use relative MIDs (e.g. ./Widget) in the widget's template.

createItemFunc

A user supplied function that creates a new event. This function is used when createOnGridClick is set to true and the user is clicking and dragging on the grid. This view takes two parameters:

  • view: the current view,
  • d: the date at the clicked location.
createOnGridClick

Indicates whether the user can create new event by clicking and dragging the grid. A createItem function must be defined on the view or the calendar object.

cssClassFunc

Optional function that returns a css class name to apply to item renderers that are displaying the specified item in parameter.

currentView

The current view displayed by the Calendar object. The currentViewChange event can be used to react on a view change.

date

The reference date used to determine along with the dateInterval and dateIntervalSteps properties the time interval to display.

dateInterval

The date interval used to compute along with the date and dateIntervalSteps the time interval to display. Valid values are "day", "week" (default value) and "month".

dateIntervalSteps

The number of date intervals used to compute along with the date and dateInterval the time interval to display. Default value is 1.

datePackage

JavaScript namespace to find Calendar routines. Uses Gregorian Calendar routines at dojo.date by default.

decodeDate

An optional function to transform store date into Date objects. Default is null.

dir
Defined by: dijit/_WidgetBase

Bi-directional support, as defined by the HTML DIR attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's default direction.

displayedItemsInvalidated

Whether the data items displayed must be recomputed, usually after the displayed time range has changed.

domNode
Defined by: dijit/_WidgetBase

This is our visible representation of the widget! Other DOM Nodes may by assigned to other properties, usually through the template system's data-dojo-attach-point syntax, but the domNode property is the canonical "top level" node in widget UI.

editable

A flag that indicates whether or not the user can edit items in the data provider. If true, the item renderers in the control are editable. The user can click on an item renderer, or use the keyboard or touch devices, to move or resize the associated event.

encodeDate

An optional function to transform Date objects into store date. Default is null.

endDate

The end date of the displayed time interval (included).

endTimeAttr

The attribute of the store item that contains the end time of the events represented by this item. Default is "endTime".

firstDayOfWeek

(Optional) The first day of week override. By default the first day of week is determined for the current locale (extracted from the CLDR). Special value -1 (default value), means use locale dependent value.

focused
Defined by: dijit/_FocusMixin

This widget or a widget it contains has focus, or is "active" because it was recently clicked.

formatItemTimeFunc

Optional function to format the time of day of the item renderers. The function takes the date, the render data object, the view and the data item as arguments and returns a String.

hoveredItem

Current render item which is under the mouse cursor.

id
Defined by: dijit/_WidgetBase

A unique, opaque ID string that can be assigned by users or by the system. If the developer passes an ID which is known not to be unique, the specified ID is ignored and the system-generated ID is used instead.

invalidatingProperties
invalidRendering
lang
Defined by: dijit/_WidgetBase

Rarely used. Overrides the default Dojo locale used to render this widget, as defined by the HTML LANG attribute. Value must be among the list of locales specified during by the Dojo bootstrap, formatted according to RFC 3066 (like en-us).

matrixView

The column view is displaying time intervals that lasts more than seven days.

matrixViewProps

Map of property/value passed to the constructor of the matrix view.

maxDate

The maximum date. If date is set, the displayed time interval the most in the future will the time interval containing this date. If endDate property is set, this mininum value of endDate.

minDate

The minimum date. If date property is set, the displayed time interval the most in the past will the time interval containing this date. If startDate property is set, this mininum value of startDate.

moveEnabled

A flag that indicates whether the user can move items displayed. If true, the user can move the items.

ownerDocument
Defined by: dijit/_WidgetBase

The document this widget belongs to. If not specified to constructor, will default to srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global

query

A query that can be passed to when querying the store.

queryOptions

Options to be applied when querying the store.

resizeEnabled

A flag that indicates whether the items can be resized. If true, the control supports resizing of items.

searchContainerNode
Defined by: dijit/_TemplatedMixin
selectedItem

In single selection mode, the selected item or in multiple selection mode the last selected item. Warning: Do not use this property directly, make sure to call set() or get() methods.

selectedItems

The list of selected items. Warning: Do not use this property directly, make sure to call set() or get() methods.

selectionMode

Valid values are:

  1. "none": No selection can be done.
  2. "single": Only one item can be selected at a time.
  3. "multiple": Several item can be selected using the control key modifier. Default value is "single".
srcNodeRef
Defined by: dijit/_WidgetBase

pointer to original DOM node

startDate

The start date of the displayed time interval.

startTimeAttr

The attribute of the store item that contains the start time of the events represented by this item. Default is "startTime".

store

The store that contains the events to display.

style
Defined by: dijit/_WidgetBase

HTML style attributes as cssText string or name/value hash

subColumnAttr

The attribute of the store item that contains the sub column name of the events represented by this item. Default is "calendar".

summaryAttr

The attribute of the store item that contains the summary of the events represented by this item. Default is "summary".

templatePath
Defined by: dijit/_TemplatedMixin

Path to template (HTML file) for this widget relative to dojo.baseUrl. Deprecated: use templateString with require([... "dojo/text!..."], ...) instead

templateString
title
Defined by: dijit/_WidgetBase

HTML title attribute.

For form widgets this specifies a tooltip to display when hovering over the widget (just like the native HTML title attribute).

For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, etc., it's used to specify the tab label, accordion pane title, etc. In this case it's interpreted as HTML.

tooltip
Defined by: dijit/_WidgetBase

When this widget's title attribute is used to for a tab label, accordion pane title, etc., this specifies the tooltip to appear when the mouse is hovered over that text.

viewChangeDuration
viewContainer

The DOM node that will contains the views.

views

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

widgetsInTemplate

Should we parse the template to find widgets that might be declared in markup inside it? (Remove for 2.0 and assume true)

Methods

_animateRange(node,toLeft,fadeIn,xFrom,xTo,onEnd)

Animates the current view using a synchronous fade and horizontal translation.

Parameter Type Description
node undefined
toLeft Boolean

Whether the view is moved to the left or to the right.

fadeIn Boolean

Whether the view is faded in or out.

xFrom Integer

Position before the animation

xTo Integer

Position after the animation

onEnd Function

Function called when the animation is finished.

_applyAttributes()
_applyViewChange(view,index,timeInterval,duration)

Applies the changes of a view time and changes the currently visible view if needed.

Parameter Type Description
view ViewBase

The view that is configured and is or will be shown.

index Integer

The view index in the internal structure.

timeInterval Date[]

The time interval displayed by the calendar.

duration Integer

The duration in days of the time interval.

_attach(node,type,func)
Defined by dijit/_AttachMixin

Roughly corresponding to dojo/on, this is the default function for processing a data-dojo-attach-event. Meant to attach to DOMNodes, not to widgets.

Parameter Type Description
node DOMNode

The node to setup a listener on.

type String

Event name like "click".

func undefined
Returns:undefined
_attachTemplateNodes(rootNode)
Defined by dijit/_AttachMixin

Iterate through the dom nodes and attach functions and nodes accordingly.

Map widget properties and functions to the handlers specified in the dom node and it's descendants. This function iterates over all nodes and looks for these properties:

  • dojoAttachPoint/data-dojo-attach-point
  • dojoAttachEvent/data-dojo-attach-event
Parameter Type Description
rootNode DomNode

The node to search for properties. All descendants will be searched.

_attrToDom(attr,value,commands)
Defined by dijit/_WidgetBase

Reflect a widget attribute (title, tabIndex, duration etc.) to the widget DOM, as specified by commands parameter. If commands isn't specified then it's looked up from attributeMap. Note some attributes like "type" cannot be processed this way as they are not mutable.

Parameter Type Description
attr String

Name of member variable (ex: "focusNode" maps to this.focusNode) pointing to DOMNode inside the widget, or alternately pointing to a subwidget

value String
commands Object
Optional
_beforeFillContent()
Defined by dijit/_AttachMixin
_changeAttrValue(name,value)
Defined by dojo/Stateful

Internal helper for directly changing an attribute value.

Directly change the value of an attribute on an object, bypassing any accessor setter. Also handles the calling of watch and emitting events. It is designed to be used by descendant class when there are two values of attributes that are linked, but calling .set() is not appropriate.

Parameter Type Description
name String

The property to set.

value Mixed

The value to set in the property.

Returns:function

Internal helper for directly changing an attribute value.

_cleanItemStoreState(id)
Parameter Type Description
id undefined
_computeCurrentView(startDate,endDate,duration)

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

Returns:dojox/calendar/ViewBase | undefined

The view to display.

_computeTimeIntervalImpl(d)

Computes the displayed time interval according to the date, dateInterval and dateIntervalSteps if date is not null or startDate and endDate properties otherwise.

Parameter Type Description
d undefined
Returns:Array
_computeVisibleItems(renderData)

Computes the data items that are in the displayed interval.

Parameter Type Description
renderData Object

The renderData that contains the start and end time of the displayed interval.

Returns:undefined
_configureView(view,index,timeInterval,duration)

Configures the view to show the specified time interval. This method is computing and setting the following properties: - "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.

_createDefaultViews()

Creates the default views: - A dojox.calendar.ColumnView instance used to display one day to seven days time intervals, - A dojox.calendar.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.

Returns:Array
_detachTemplateNodes()
Defined by dijit/_AttachMixin

Detach and clean up the attachments made in _attachtempalteNodes.

_escapeValue(val)

Escape a value to be inserted into the template, either into an attribute value (ex: foo="${bar}") or as inner text of an element (ex: ${foo})

Parameter Type Description
val String
Returns:undefined
_fillContent(source)

Relocate source contents to templated container node. this.containerNode must be able to receive children, or exceptions will be thrown.

Parameter Type Description
source DomNode
_get(name)
Defined by dijit/_WidgetBase

Helper function to get value for specified property stored by this._set(), i.e. for properties with custom setters. Used mainly by custom getters.

For example, CheckBox._getValueAttr() calls this._get("value").

Parameter Type Description
name String
Returns:undefined
_getAttrNames(name)
Defined by dijit/_WidgetBase

Helper function for get() and set(). Caches attribute name values so we don't do the string ops every time.

Parameter Type Description
name undefined
Returns:undefined | object
_getCurrentViewAttr()
Returns:undefined
_getItemStoreStateObj(item)
Parameter Type Description
item Object
Returns:undefined
_getSelectedItemsAttr()
Returns:Array
_getViewsAttr()
Returns:undefined
_initItems(items)
Parameter Type Description
items undefined
Returns:undefined
_introspect()
Defined by dijit/_WidgetBase

Collect metadata about this widget (only once per class, not once per instance):

- list of attributes with custom setters, storing in this.constructor._setterAttrs
- generate this.constructor._onMap, mapping names like "mousedown" to functions like onMouseDown
_navigate(dir)
Parameter Type Description
dir undefined
_performViewTransition(view,index,timeInterval,duration)
Parameter Type Description
view undefined
index undefined
timeInterval undefined
duration undefined
_processTemplateNode(baseNode,getAttrFunc,attachFunc)
Defined by dijit/_AttachMixin

Process data-dojo-attach-point and data-dojo-attach-event for given node or widget. Returns true if caller should process baseNode's children too.

Parameter Type Description
baseNode DOMNode | Widget
getAttrFunc Function

Function to get the specified property for a given DomNode/Widget.

attachFunc Function
Optional

Attaches an event handler from the specified node/widget to specified function.

Returns:boolean
_refreshDecorationItemsRendering()
_refreshItemsRendering()
_set(name,value)
Defined by dijit/_WidgetBase

Helper function to set new value for specified property, and call handlers registered with watch() if the value has changed.

Parameter Type Description
name String
value anything
_setCurrentViewAttr(view)
Parameter Type Description
view undefined
_setDateAttr(value)
Parameter Type Description
value undefined
_setDateIntervalAttr(value)
Parameter Type Description
value undefined
_setDateIntervalStepsAttr(value)
Parameter Type Description
value undefined
_setDecorationItemsAttr(value)
Parameter Type Description
value undefined
_setDecorationStoreAttr(value)
Parameter Type Description
value undefined
_setEndDateAttr(value)
Parameter Type Description
value undefined
_setFirstDayOfWeekAttr(value)
Parameter Type Description
value undefined
_setHoveredItem(item,renderer)
Parameter Type Description
item undefined
renderer undefined
_setItemsAttr(value)
Parameter Type Description
value undefined
_setItemStoreState(item,state)
Parameter Type Description
item Object
state String
_setOwnerDocumentAttr(val)
Defined by dijit/_WidgetBase
Parameter Type Description
val undefined
_setSelectedItemAttr(value)
Parameter Type Description
value undefined
_setSelectedItemsAttr(value)
Parameter Type Description
value undefined
_setSelectionModeAttr(value)
Parameter Type Description
value undefined
_setStartDateAttr(value)
Parameter Type Description
value undefined
_setStoreAttr(value)
Parameter Type Description
value undefined
Returns:undefined
_setStyleAttr(value)
Defined by dijit/_WidgetBase

Sets the style attribute of the widget according to value, which is either a hash like {height: "5px", width: "3px"} or a plain string

Determines which node to set the style on based on style setting in attributeMap.

Parameter Type Description
value String | Object
_setTextDirAttr(value)
Parameter Type Description
value undefined
_setViewsAttr(views)
Parameter Type Description
views undefined
_showView(oldView,newView)

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.

_stringRepl(tmpl)

Does substitution of ${foo} type properties in template string

Parameter Type Description
tmpl undefined
Returns:undefined
_validateProperties()
addInvalidatingProperties(properties)

Add properties to the watched properties to trigger invalidation. This method must be called in the constructor. It is typically used by subclasses of a _Invalidating class to add more properties to watch for.

Parameter Type Description
properties String[]

The list of properties to watch for.

addView(view,index)

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.

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.

Parameter Type Description
e Object

The column header click event.

computeTimeInterval()
Returns:Array | undefined
configureButtons()

Set the localized labels of the buttons and the event handlers.

connect(obj,event,method)
Defined by dijit/_WidgetBase

Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead.

Connects specified obj/event to specified method of this object and registers for disconnect() on widget destroy.

Provide widget-specific analog to dojo.connect, except with the implicit use of this widget as the target object. Events connected with this.connect are disconnected upon destruction.

Parameter Type Description
obj Object | null
event String | Function
method String | Function
Returns:any | undefined

A handle that can be passed to disconnect in order to disconnect before the widget is destroyed.

Examples

Example 1

var btn = new Button();
// when foo.bar() is called, call the listener we're going to
// provide in the scope of btn
btn.connect(foo, "bar", function(){
    console.debug(this.toString());
});
create(params,srcNodeRef)
Defined by dijit/_WidgetBase

Kick off the life-cycle of a widget

Create calls a number of widget methods (postMixInProperties, buildRendering, postCreate, etc.), some of which of you'll want to override. See http://dojotoolkit.org/reference-guide/dijit/_WidgetBase.html for a discussion of the widget creation lifecycle.

Of course, adventurous developers could override create entirely, but this should only be done as a last resort.

Parameter Type Description
params Object | null

Hash of initialization parameters for widget, including scalar values (like title, duration etc.) and functions, typically callbacks like onClick. The hash can contain any of the widget's properties, excluding read-only properties.

srcNodeRef DOMNode | String
Optional

If a srcNodeRef (DOM node) is specified:

  • use srcNodeRef.innerHTML as my contents
  • if this is a behavioral widget then apply behavior to that srcNodeRef
  • otherwise, replace srcNodeRef with my generated DOM tree
dayButtonClick(e)

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 undefined
defer(fcn,delay)
Defined by dijit/_WidgetBase

Wrapper to setTimeout to avoid deferred functions executing after the originating widget has been destroyed. Returns an object handle with a remove method (that returns null) (replaces clearTimeout).

Parameter Type Description
fcn Function

Function reference.

delay Number
Optional

Delay, defaults to 0.

Returns:object
destroy(preserveDom)
Defined by dijit/_WidgetBase

Destroy this widget, but not its descendants. Descendants means widgets inside of this.containerNode. Will also destroy any resources (including widgets) registered via this.own().

This method will also destroy internal widgets such as those created from a template, assuming those widgets exist inside of this.domNode but outside of this.containerNode.

For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not depend on the current ability to destroy a widget without destroying its descendants. Generally they should use destroyRecursive() for widgets with children.

Parameter Type Description
preserveDom Boolean

If true, this method will leave the original DOM structure alone. Note: This will not yet work with _TemplatedMixin widgets

destroyDescendants(preserveDom)
Defined by dijit/_WidgetBase

Recursively destroy the children of this widget and their descendants.

Parameter Type Description
preserveDom Boolean
Optional

If true, the preserveDom attribute is passed to all descendant widget's .destroy() method. Not for use with _Templated widgets.

destroyRecursive(preserveDom)
Defined by dijit/_WidgetBase

Destroy this widget and its descendants

This is the generic "destructor" function that all widget users should call to cleanly discard with a widget. Once a widget is destroyed, it is removed from the manager object.

Parameter Type Description
preserveDom Boolean
Optional

If true, this method will leave the original DOM structure alone of descendant Widgets. Note: This will NOT work with dijit._TemplatedMixin widgets.

destroyRendering(preserveDom)
Defined by dijit/_WidgetBase

Destroys the DOM nodes associated with this widget.

Parameter Type Description
preserveDom Boolean
Optional

If true, this method will leave the original DOM structure alone during tear-down. Note: this will not work with _Templated widgets yet.

disconnect(handle)
Defined by dijit/_WidgetBase

Deprecated, will be removed in 2.0, use handle.remove() instead.

Disconnects handle created by connect.

Parameter Type Description
handle undefined
dispatchChange(oldSelectedItem,newSelectedItem,renderer,triggerEvent)

Dispatch a selection change event.

Parameter Type Description
oldSelectedItem Object

The previously selectedItem.

newSelectedItem Object

The new selectedItem.

renderer Object

The visual renderer of the selected/deselected item.

triggerEvent Event

The event that lead to the selection of the item.

emit(type,eventObj,callbackArgs)
Defined by dijit/_WidgetBase

Used by widgets to signal that a synthetic event occurred, ex:

myWidget.emit("attrmodified-selectedChildWidget", {}).

Emits an event on this.domNode named type.toLowerCase(), based on eventObj. Also calls onType() method, if present, and returns value from that method. By default passes eventObj to callback, but will pass callbackArgs instead, if specified. Modifies eventObj by adding missing parameters (bubbles, cancelable, widget).

Parameter Type Description
type String
eventObj Object
Optional
callbackArgs Array
Optional
Returns:undefined
floorDate(date,unit,steps,reuse)

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.

Returns:Date | undefined
floorToDay(date,reuse)

Floors the specified date to the start of day.

Parameter Type Description
date Date

Date to floor.

reuse Boolean

Whether use the specified instance or create a new one. Default is false.

Returns:Date | undefined
floorToWeek(d)

Floors the specified date to the beginning of week.

Parameter Type Description
d undefined
Returns:undefined
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.

Parameter Type Description
e undefined
get(name)
Defined by dijit/_WidgetBase

Get a property from a widget.

Get a named property from a widget. The property may potentially be retrieved via a getter method. If no getter is defined, this just retrieves the object's property.

For example, if the widget has properties foo and bar and a method named _getFooAttr(), calling: myWidget.get("foo") would be equivalent to calling widget._getFooAttr() and myWidget.get("bar") would be equivalent to the expression widget.bar2

Parameter Type Description
name undefined

The property to get.

Returns:undefined
getChildren()
Defined by dijit/_WidgetBase

Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent is this widget. Note that it does not return all descendants, but rather just direct children. Analogous to Node.childNodes, except containing widgets rather than DOMNodes.

The result intentionally excludes internally created widgets (a.k.a. supporting widgets) outside of this.containerNode.

Note that the array returned is a simple array. Application code should not assume existence of methods like forEach().

Returns:Array
getIdentity(item)
Parameter Type Description
item undefined
Returns:null
getItemStoreState(item)

Returns the creation state of an item. This state is changing during the interactive creation of an item. Valid values are: - "unstored": The event is being interactively created. It is not in the store yet. - "storing": The creation gesture has ended, the event is being added to the store. - "stored": The event is not in the two previous states, and is assumed to be in the store (not checking because of performance reasons, use store API for testing existence in store). item: Object The item. returns: String

Parameter Type Description
item undefined
Returns:undefined
getParent()
Defined by dijit/_WidgetBase

Returns the parent widget of this widget.

Returns:undefined
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.

Parameter Type Description
views undefined
invalidateRendering()

Invalidating the rendering for the next executation frame.

isFocusable()
Defined by dijit/_WidgetBase

Return true if this widget can currently be focused and false if not

Returns:undefined
isItemEditable(item,rendererKind)

Computes whether particular item renderer can be edited. By default it is using the editable property value.

Parameter Type Description
item Object

The data item represented by the renderer.

rendererKind String

The kind of renderer.

Returns:Boolean | undefined
isItemHovered(item)

Returns whether the specified item is hovered or not.

Parameter Type Description
item Object

The item.

Returns:Boolean | boolean
isItemMoveEnabled(item,rendererKind)

Computes whether particular item renderer can be moved. By default it is using the moveEnabled property value.

Parameter Type Description
item Object

The data item represented by the renderer.

rendererKind String

The kind of renderer.

Returns:Boolean | undefined
isItemResizeEnabled(item,rendererKind)

Computes whether particular item renderer can be resized. By default it is using the resizedEnabled property value.

Parameter Type Description
item Object

The data item represented by the renderer.

rendererKind String

The kind of renderer.

Returns:Boolean | undefined
isItemSelected(item)

Returns whether an item is selected or not.

Parameter Type Description
item Object

The item to test the selection for.

Returns:boolean | undefined
isLeftToRight()
Defined by dijit/_WidgetBase

Return this widget's explicit or implicit orientation (true for LTR, false for RTL)

Returns:undefined
isOverlapping(renderData,start1,end1,start2,end2,includeLimits)

Computes if the first time range defined by the start1 and end1 parameters is overlapping the second time range defined by the start2 and end2 parameters.

Parameter Type Description
renderData Object

The current renderData

start1 Date

The start time of the first time range.

end1 Date

The end time of the first time range.

start2 Date

The start time of the second time range.

end2 Date

The end time of the second time range.

includeLimits Boolean

Whether include the end time or not.

Returns:Boolean | undefined
isStartOfDay(d)

Tests if the specified date represents the starts of day.

Parameter Type Description
d Date

The date to test.

Returns:Boolean | undefined
isToday(date)

Returns whether the specified date is in the current day.

Parameter Type Description
date Date

The date to test.

Returns:Boolean | undefined
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.

Parameter Type Description
item Object

The store item.

store dojo.store.api.Store

The store.

Returns:Object | undefined | object
matrixViewRowHeaderClick(e)

Function called when the cell of a row header of the matrix view is clicked. The implementation is doing the foolowing actions: - 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.

monthButtonClick(e)

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 undefined
newDate(obj)

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

Returns:Date | undefined
nextRange()
on(type,func)
Defined by dijit/_WidgetBase

Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }).

Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). Note that the function is not run in any particular scope, so if (for example) you want it to run in the widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)).

Parameter Type Description
type String | Function

Name of event (ex: "click") or extension event like touch.press.

func Function
Returns:undefined
own()
Defined by dijit/Destroyable

Track specified handles and remove/destroy them when this instance is destroyed, unless they were already removed/destroyed manually.

Returns:any | undefined

The array of specified handles, so you can do for example:

var handle = this.own(on(...))[0];
placeAt(reference,position)
Defined by dijit/_WidgetBase

Place this widget somewhere in the DOM based on standard domConstruct.place() conventions.

A convenience function provided in all _Widgets, providing a simple shorthand mechanism to put an existing (or newly created) Widget somewhere in the dom, and allow chaining.

Parameter Type Description
reference String | DomNode | DocumentFragment | dijit/_WidgetBase

Widget, DOMNode, DocumentFragment, or id of widget or DOMNode

position String | Int
Optional

If reference is a widget (or id of widget), and that widget has an ".addChild" method, it will be called passing this widget instance into that method, supplying the optional position index passed. In this case position (if specified) should be an integer.

If reference is a DOMNode (or id matching a DOMNode but not a widget), the position argument can be a numeric index or a string "first", "last", "before", or "after", same as dojo/dom-construct::place().

Returns:dijit/_WidgetBase | function

Provides a useful return of the newly created dijit._Widget instance so you can "chain" this function by instantiating, placing, then saving the return value to a variable.

Examples

Example 1

// create a Button with no srcNodeRef, and place it in the body:
var button = new Button({ label:"click" }).placeAt(win.body());
// now, 'button' is still the widget reference to the newly created button
button.on("click", function(e){ console.log('click'); }));

Example 2

// create a button out of a node with id="src" and append it to id="wrapper":
var button = new Button({},"src").placeAt("wrapper");

Example 3

// place a new button as the first element of some div
var button = new Button({ label:"click" }).placeAt("wrapper","first");

Example 4

// create a contentpane and add it to a TabContainer
var tc = dijit.byId("myTabs");
new ContentPane({ href:"foo.html", title:"Wow!" }).placeAt(tc)
postCreate()
postMixInProperties()
Defined by dijit/_WidgetBase

Called after the parameters to the widget have been read-in, but before the widget template is instantiated. Especially useful to set properties that are referenced in the widget template.

postscript(params,srcNodeRef)
Defined by dijit/_WidgetBase

Kicks off widget instantiation. See create() for details.

Parameter Type Description
params Object
Optional
srcNodeRef DomNode | String
previousRange()
refreshRendering()

Refreshes all the visual rendering of the calendar.

removeView(view)

Removes a view from the calendar's view list.

Parameter Type Description
view dojox/calendar/ViewBase

The view to remove from the calendar.

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 encodeDate property if not null. If the encodeDate property is null a Date object will be set in the start and end time. When using a JsonRest store, for example, it is recommended to transfer dates using the ISO format (see dojo.date.stamp). In that case, provide a custom function to the encodeDate property that is using the date ISO encoding provided by Dojo.

Parameter Type Description
renderItem Object

The render item.

store dojo.store.api.Store

The store.

Returns:Object | undefined
resize(changeSize)
Parameter Type Description
changeSize undefined
selectFromEvent(e,item,renderer,dispatch)

Applies selection triggered by an user interaction

Parameter Type Description
e Event

The source event of the user interaction.

item Object

The render item that has been selected/deselected.

renderer Object

The visual renderer of the selected/deselected item.

dispatch Boolean

Whether an event must be dispatched or not.

Returns:Boolean | boolean

Returns true if the selection has changed and false otherwise.

set(name,value)
Defined by dijit/_WidgetBase

Set a property on a widget

Sets named properties on a widget which may potentially be handled by a setter in the widget.

For example, if the widget has properties foo and bar and a method named _setFooAttr(), calling myWidget.set("foo", "Howdy!") would be equivalent to calling widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) would be equivalent to the statement widget.bar = 3;

set() may also be called with a hash of name/value pairs, ex:

myWidget.set({
    foo: "Howdy",
    bar: 3
});

This is equivalent to calling set(foo, "Howdy") and set(bar, 3)

Parameter Type Description
name undefined

The property to set.

value undefined

The value to set in the property.

Returns:function | string

Set a property on a widget

setItemSelected(item,value)

Change the selection state of an item.

Parameter Type Description
item Object

The item to change the selection state for.

value Boolean

True to select the item, false to deselect it.

startup()
Defined by dijit/_WidgetBase

Processing after the DOM fragment is added to the document

Called after a widget and its children have been created and added to the page, and all related widgets have finished their create() cycle, up through postCreate().

Note that startup() may be called while the widget is still hidden, for example if the widget is inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. For widgets that need to do layout, it's best to put that layout code inside resize(), and then extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible.

subscribe(t,method)
Defined by dijit/_WidgetBase

Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead.

Subscribes to the specified topic and calls the specified method of this object and registers for unsubscribe() on widget destroy.

Provide widget-specific analog to dojo.subscribe, except with the implicit use of this widget as the target object.

Parameter Type Description
t String

The topic

method Function

The callback

Returns:undefined

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
todayButtonClick(e)

The action triggered when the today button is clicked. By default, calls the goToday() method.

Parameter Type Description
e undefined
toString()
Defined by dijit/_WidgetBase

Returns a string that represents the widget.

When a widget is cast to a string, this method will be used to generate the output. Currently, it does not implement any sort of reversible serialization.

Returns:string
uninitialize()
Defined by dijit/_WidgetBase

Deprecated. Override destroy() instead to implement custom widget tear-down behavior.

Returns:boolean
unsubscribe(handle)
Defined by dijit/_WidgetBase

Deprecated, will be removed in 2.0, use handle.remove() instead.

Unsubscribes handle created by this.subscribe. Also removes handle from this widget's list of subscriptions

Parameter Type Description
handle Object
updateRenderers(obj,stateOnly)
Parameter Type Description
obj undefined
stateOnly undefined
validateRendering()

Immediately validate the rendering if it has been invalidated. You generally do not call that method yourself.

watch(name,callback)
Defined by dojo/Stateful

Watches a property for changes

Parameter Type Description
name String
Optional

Indicates the property to watch. This is optional (the callback may be the only parameter), and if omitted, all the properties will be watched

callback Function

The function to execute when the property changes. This will be called after the property has been changed. The callback will be called with the |this| set to the instance, the first argument as the name of the property, the second argument as the old value and the third argument as the new value.

Returns:any | object

An object handle for the watch. The unwatch method of this object can be used to discontinue watching this property:

var watchHandle = obj.watch("foo", callback);
watchHandle.unwatch(); // callback won't be called now
weekButtonClick(e)

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 undefined

Events

_onBlur()
Defined by: dijit/_FocusMixin

This is where widgets do processing for when they stop being active, such as changing CSS classes. See onBlur() for more details.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
_onFocus()
Defined by: dijit/_FocusMixin

This is where widgets do processing for when they are active, such as changing CSS classes. See onFocus() for more details.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
_onMap(type)
Defined by: dijit/_WidgetBase

Maps on() type parameter (ex: "mousemove") to method name (ex: "onMouseMove"). If type is a synthetic event like touch.press then returns undefined.

Parameter Type Description
type String | Function
Returns:undefined

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
_onRendererCreated(e)
Parameter Type Description
e undefined

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
_onRendererDestroyed(e)
Parameter Type Description
e undefined

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
_onRendererRecycled(e)
Parameter Type Description
e undefined

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
_onRendererReused(e)
Parameter Type Description
e undefined

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
_onRenderersLayoutDone(view)
Parameter Type Description
view undefined

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
_onViewAdded(view)
Parameter Type Description
view undefined

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
_onViewRemoved(view)
Parameter Type Description
view undefined

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onBlur()
Defined by: dijit/_FocusMixin

Called when the widget stops being "active" because focus moved to something outside of it, or the user clicked somewhere outside of it, or the widget was hidden.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onChange()

Called when the selection changed.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onColumnHeaderClick(e)

Event dispatched when a column header cell is dispatched.

Parameter Type Description
e Object

Header click event.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onCurrentViewChange(e)

Event dispatched when the current view has changed.

Parameter Type Description
e Event

Object that contains the oldView and newView properties.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onExpandRendererClick(e)

Event dispatched when an expand renderer is clicked.

Parameter Type Description
e Object

Expand renderer click event.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onFocus()
Defined by: dijit/_FocusMixin

Called when the widget becomes "active" because it or a widget inside of it either has focus, or has recently been clicked.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onGridClick(e)

Event dispatched when the grid has been clicked.

Parameter Type Description
e Object

The event dispatched when the grid is clicked.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onGridDoubleClick(e)

Event dispatched when the grid has been double-clicked.

Parameter Type Description
e Object

The event dispatched when the grid is double-clicked.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onItemClick(e)

Event dispatched when an item renderer has been clicked.

Parameter Type Description
e Object

The event dispatched when an item is clicked.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onItemContextMenu(e)

Event dispatched when an item renderer has been context-clicked.

Parameter Type Description
e Object

The event dispatched when an item is context-clicked.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onItemDoubleClick(e)

Event dispatched when an item renderer has been double-clicked.

Parameter Type Description
e Object

The event dispatched when an item is double-clicked.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onItemEditBegin(e)

Event dispatched when the item is entering the editing mode.

Parameter Type Description
e Object

The editing event.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onItemEditBeginGesture(e)

Event dispatched when an editing gesture is beginning.

Parameter Type Description
e Object

The editing event.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onItemEditEnd(e)

Event dispatched when the item is leaving the editing mode.

Parameter Type Description
e Object

The editing event.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onItemEditEndGesture(e)

Event dispatched at the end of an editing gesture.

Parameter Type Description
e Object

The editing event.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onItemEditMoveGesture(e)

Event dispatched during a move editing gesture.

Parameter Type Description
e Object

The editing event.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onItemEditResizeGesture(e)

Event dispatched during a resize editing gesture.

Parameter Type Description
e Object

The editing event.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onItemRollOut(e)
Parameter Type Description
e Object

The event dispatched when the mouse cursor enters in the item renderer.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onItemRollOver(e)
Parameter Type Description
e Object

The event dispatched when the mouse cursor enters in the item renderer.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onRendererCreated(e)

Event dispatched when an item renderer has been created.

Parameter Type Description
e Object

The renderer lifecycle event.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onRendererDestroyed(e)

Event dispatched when an item renderer is destroyed.

Parameter Type Description
e Object

The renderer lifecycle event.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onRendererRecycled(e)

Event dispatched when an item renderer has been recycled.

Parameter Type Description
e Object

The renderer lifecycle event.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onRendererReused(e)

Event dispatched when an item renderer that was recycled is reused.

Parameter Type Description
e Object

The renderer lifecycle event.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onRenderersLayoutDone(view)

Event triggered when item renderers layout has been done.

Parameter Type Description
view dojox/calendar/ViewBase

The view that has been laid-out.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onRowHeaderClick(e)

Event dispatched when a row header cell is clicked.

Parameter Type Description
e Object

Header click event.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onTimeIntervalChange(e)

Event dispatched when the displayed time interval has changed.

Parameter Type Description
e Object

The time interval change event.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onViewAdded(view)

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.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onViewConfigurationChange(view)

Event dispatched when the view has been configured after the queried time range and before the current view is changed (if needed).

Parameter Type Description
view ViewBase

The view that has been configured.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
onViewRemoved(view)

Event dispatched when a view is removed from the calendar.

Parameter Type Description
view dojox/calendar/ViewBase

The view that has been removed from the calendar.

Examples

Example 1

var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});
Error in the documentation? Can’t find what you are looking for? Let us know!