public/javascripts/yui/treeview/treeview.js
function (editorData) {
    
        var cal, container = editorData.inputContainer;
        
        if (Lang.isUndefined(Calendar)) {
            Dom.replaceClass(editorData.editorPanel,'ygtv-edit-DateNode','ygtv-edit-TextNode');
            YAHOO.widget.DateNode.superclass.fillEditorContainer.call(this, editorData);
            return;
        }
            
        if (editorData.nodeType != this._type) {
            editorData.nodeType = this._type;
            editorData.saveOnEnter = false;
            
            editorData.node.destroyEditorContents(editorData);

            editorData.inputObject = cal = new Calendar(container.appendChild(document.createElement('div')));
            if (this.calendarConfig) { 
                cal.cfg.applyConfig(this.calendarConfig,true); 
                cal.cfg.fireQueue();
            }
            cal.selectEvent.subscribe(function () {
                this.tree._closeEditor(true);
            },this,true);
        } else {
            cal = editorData.inputObject;
        }

		editorData.oldValue = this.label;
        cal.cfg.setProperty("selected",this.label, false); 

        var delim = cal.cfg.getProperty('DATE_FIELD_DELIMITER');
        var pageDate = this.label.split(delim);
        cal.cfg.setProperty('pagedate',pageDate[cal.cfg.getProperty('MDY_MONTH_POSITION') -1] + delim + pageDate[cal.cfg.getProperty('MDY_YEAR_POSITION') -1]);
        cal.cfg.fireQueue();

        cal.render();
        cal.oDomContainer.focus();
    }
function (editorData) {
    
        var cal, container = editorData.inputContainer;
        
        if (Lang.isUndefined(Calendar)) {
            Dom.replaceClass(editorData.editorPanel,'ygtv-edit-DateNode','ygtv-edit-TextNode');
            YAHOO.widget.DateNode.superclass.fillEditorContainer.call(this, editorData);
            return;
        }
            
        if (editorData.nodeType != this._type) {
            editorData.nodeType = this._type;
            editorData.saveOnEnter = false;
            
            editorData.node.destroyEditorContents(editorData);

            editorData.inputObject = cal = new Calendar(container.appendChild(document.createElement('div')));
            if (this.calendarConfig) { 
                cal.cfg.applyConfig(this.calendarConfig,true); 
                cal.cfg.fireQueue();
            }
            cal.selectEvent.subscribe(function () {
                this.tree._closeEditor(true);
            },this,true);
        } else {
            cal = editorData.inputObject;
        }

		editorData.oldValue = this.label;
        cal.cfg.setProperty("selected",this.label, false); 

        var delim = cal.cfg.getProperty('DATE_FIELD_DELIMITER');
        var pageDate = this.label.split(delim);
        cal.cfg.setProperty('pagedate',pageDate[cal.cfg.getProperty('MDY_MONTH_POSITION') -1] + delim + pageDate[cal.cfg.getProperty('MDY_YEAR_POSITION') -1]);
        cal.cfg.fireQueue();

        cal.render();
        cal.oDomContainer.focus();
    }
function ( editorData ) { var cal , container = editorData . inputContainer ; if ( Lang . isUndefined ( Calendar ) ) { Dom . replaceClass ( editorData . editorPanel , 'ygtv-edit-DateNode' , 'ygtv-edit-TextNode' ) ; YAHOO . widget . DateNode . superclass . fillEditorContainer . call ( this , editorData ) ; return ; } if ( editorData . nodeType != this . _type ) { editorData . nodeType = this . _type ; editorData . saveOnEnter = false ; editorData . node . destroyEditorContents ( editorData ) ; editorData . inputObject = cal = new Calendar ( container . appendChild ( document . createElement ( 'div' ) ) ) ; if ( this . calendarConfig ) { cal . cfg . applyConfig ( this . calendarConfig , true ) ; cal . cfg . fireQueue ( ) ; } cal . selectEvent . subscribe ( function ( ) { this . tree . _closeEditor ( true ) ; } , this , true ) ; } else { cal = editorData . inputObject ; } editorData . oldValue = this . label ; cal . cfg . setProperty ( "selected" , this . label , false ) ; var delim = cal . cfg . getProperty ( 'DATE_FIELD_DELIMITER' ) ; var pageDate = this . label . split ( delim ) ; cal . cfg . setProperty ( 'pagedate' , pageDate [ cal . cfg . getProperty ( 'MDY_MONTH_POSITION' ) - 1 ] + delim + pageDate [ cal . cfg . getProperty ( 'MDY_YEAR_POSITION' ) - 1 ] ) ; cal . cfg . fireQueue ( ) ; cal . render ( ) ; cal . oDomContainer . focus ( ) ; }
If YAHOO.widget.Calendar is available, it will pop up a Calendar to enter a new date.  Otherwise, it falls back to a plain &lt;input&gt;  textbox
@method fillEditorContainer
@param editorData {YAHOO.widget.TreeView.editorData}  a shortcut to the static object holding editing information
@return void
If YAHOO . widget . Calendar is available it will pop up a Calendar to enter a new date . Otherwise it falls back to a plain &lt ; input&gt ; textbox