* @event select
* Fires when select a date.
* @param {Roo.bootstrap.MonthField} this
- * @param {Mixed} date The date value
+ * @param {String} oldvalue The old value
+ * @param {String} newvalue The new value
*/
select : true
});
},
- setValue: function(v)
+ setValue: function(v, suppressEvent)
{
+ var o = this.getValue();
+
Roo.bootstrap.MonthField.superclass.setValue.call(this, v);
this.update();
-// this.fireEvent('select', this, this.date);
+ if(suppressEvent !== true){
+ this.fireEvent('select', this, o, v);
+ }
},
this.setValue(Roo.bootstrap.MonthField.dates[this.language].months[this.vIndex]);
this.hide();
-
- this.fireEvent("select", this, e);
},
tag: 'span',
cls: 'month',
html: Roo.bootstrap.MonthField.dates[this.language].monthsShort[i++]
- }
+ };
months.createChild(month);
}
place: function()
{
- if(this.isInline) return;
+ if(this.isInline) {
+ return;
+ }
this.picker().removeClass(['bottom', 'top']);
{
Roo.bootstrap.MonthField.superclass.onFocus.call(this);
this.show();
-
- this.fireEvent("focus", this);
},
onBlur : function()
this.setValue(d);
this.hide();
-
- this.fireEvent("blur", this);
},
show : function()
hide : function()
{
- if(this.isInline) return;
+ if(this.isInline) {
+ return;
+ }
this.picker().hide();
this.fireEvent('hide', this, this.date);
{
Roo.bootstrap.MonthField.superclass.keyup.call(this);
this.update();
-
- this.fireEvent("keyup", this, e);
},
fireKey: function(e)
{
if (!this.picker().isVisible()){
- if (e.keyCode == 27) // allow escape to hide and re-show picker
+ if (e.keyCode == 27) {// allow escape to hide and re-show picker
this.show();
+ }
return;
}
this.hide();
}
-
- this.fireEvent("specialkey", this, e);
},
remove: function()