Yahoo! UI Library

TreeView Widget  2.8.0r4

Yahoo! UI Library > treeview > YAHOO.widget.DateNode
Search:
 
Filters

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

Methods

displayEditedValue

void displayEditedValue ( value , editorData )
Finally displays the newly entered date in the tree. Overrides Node.displayEditedValue.
Parameters:
value <string> date to be displayed and stored in the node
editorData <YAHOO.widget.TreeView.editorData> a shortcut to the static object holding editing information
Returns: void

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

getEditorValue

string getEditorValue ( editorData )
Returns the value from the input element. Overrides Node.getEditorValue.
Parameters:
editorData <YAHOO.widget.TreeView.editorData> a shortcut to the static object holding editing information
Returns: string
date entered

getNodeDefinition

Object | false getNodeDefinition ( )
Returns an object which could be used to build a tree out of this node and its children. It can be passed to the tree constructor to reproduce this node as a tree. It will return false if the node or any descendant loads dynamically, regardless of whether it is loaded or not.
Returns: Object | false
definition of the node or false if this node or any descendant is defined as dynamic

Events inherited from YAHOO.widget.Node:


Copyright © 2009 Yahoo! Inc. All rights reserved.