# Yahoo! UI Library

### TreeView Widget 2.6.0

Yahoo! UI Library > treeview > YAHOO.widget.DateNode

Show Private Show Protected Show Deprecated

## Class YAHOO.widget.DateNode - extends YAHOO.widget.TextNode

A Date-specific implementation that differs from TextNode in that it uses YAHOO.widget.Calendar as an in-line editor, if available If Calendar is not available, it behaves as a plain TextNode.

### Constructor

YAHOO.widget.DateNode `( oData , oParent , expanded )`

Parameters:
  `oData <object>` a string or object containing the data that will be used to render this node. Providing a string is the same as providing an object with a single property named label. All values in the oData will be used to set equally named properties in the node as long as the node does have such properties, they are not undefined, private nor functions. All attributes are made available in noderef.data, which can be used to store custom attributes. TreeView.getNode(s)ByProperty can be used to retrieve a node by one of the attributes.
  `oParent <YAHOO.widget.Node>` this node's parent node
  `expanded <boolean>` the initial expanded/collapsed state (deprecated; use oData.expanded)

### Properties

#### _type `- private string`

The node type
Default Value: "DateNode"

#### calendarConfig `- object`

Configuration object for the Calendar editor, if used. See http://developer.yahoo.com/yui/calendar/#internationalization

#### Properties inherited from YAHOO.widget.TextNode:

`_type, label, labelElId, labelStyle, title`

#### Properties inherited from YAHOO.widget.Node:

`_dynLoad, _focusHighlightedItems, _type, children, childrenRendered, contentElId, contentStyle, data, dataLoader, depth, dynamicLoadComplete, editable, expanded, hasIcon, href, iconMode, index, isLeaf, isLoading, multiExpand, nextSibling, nowrap, parent, previousSibling, renderHidden, target, tree`

#### Properties inherited from YAHOO.util.EventProvider:

`__yui_events, __yui_subscribers`

### Methods

#### fillEditorContainer

`fillEditorContainer ( editorData )`
If YAHOO.widget.Calendar is available, it will pop up a Calendar to enter a new date. Otherwise, it falls back to a plain <input> textbox

Parameters:
  `editorData <YAHOO.widget.TreeView.editorData>` a shortcut to the static object holding editing information

#### saveEditorValue

`void saveEditorValue ( editorData )`
Saves the date entered in the editor into the DateNode label property and displays it. Overrides Node.saveEditorValue

Parameters:
  `editorData <YAHOO.widget.TreeView.editorData>` a shortcut to the static object holding editing information

Returns: `void`

#### Methods inherited from YAHOO.widget.TextNode:

`destroyEditorContents, fillEditorContainer, getLabelEl, getNodeDefinition, saveEditorValue, setUpLabel`

#### Methods inherited from YAHOO.widget.Node:

`appendChild, appendTo, applyParent, collapse, collapseAll, completeRender, destroyEditorContents, editNode, expand, expandAll, fillEditorContainer, focus, getAncestor, getChildrenEl, getChildrenElId, getChildrenHtml, getContentEl, getContentHtml, getDepthStyle, getEl, getElId, getHoverStyle, getHtml, getIconMode, getNodeCount, getNodeDefinition, getNodeHtml, getSiblings, getStyle, getToggleEl, getToggleElId, getToggleLink, hasChildren, hideChildren, init, insertAfter, insertBefore, isChildOf, isDynamic, isRoot, loadComplete, refresh, renderChildren, saveEditorValue, setDynamicLoad, showChildren, toggle, toString`

#### Methods inherited from YAHOO.util.EventProvider:

`createEvent, fireEvent, hasEvent, subscribe, unsubscribe, unsubscribeAll`

#### Events inherited from YAHOO.widget.Node:

`parentChange,`

Copyright © 2008 Yahoo! Inc. All rights reserved.