dijit.form._DateTimeTextBox._open
dojo.require("dijit.form._DateTimeTextBox");
defined in dijit/form/_DateTimeTextBox.js
opens the TimePicker, and sets the onValueSelected value
Usage
function () (view source)
if(this.disabled || this.readOnly || !this.popupClass){return;} var textBox = this; if(!this._picker){ var PopupProto=dojo.getObject(this.popupClass, false); this._picker = new PopupProto({ onValueSelected: function(value){ textBox.focus(); // focus the textbox before the popup closes to avoid reopening the popup setTimeout(dojo.hitch(textBox, "_close"), 1); // allow focus time to take // this will cause InlineEditBox and other handlers to do stuff so make sure it's last dijit.form._DateTimeTextBox.superclass.setValue.call(textBox, value, true); }, lang: textBox.lang, constraints: textBox.constraints, isDisabledDate: function(/*Date*/ date){ // summary: // disables dates outside of the min/max of the _DateTimeTextBox var compare = dojo.date.compare; var constraints = textBox.constraints; return constraints && (constraints.min && (compare(constraints.min, date, "date") > 0) || (constraints.max && compare(constraints.max, date, "date") < 0)); } }); this._picker.setValue(this.getValue() || new Date()); } if(!this._opened){ dijit.popup.open({ parent: this, popup: this._picker, around: this.domNode, onCancel: dojo.hitch(this, this._close), onClose: function(){ textBox._opened=false; } }); this._opened=true; } dojo.marginBox(this._picker.domNode,{ w:this.domNode.offsetWidth });