X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=ux%2FDateDisplay.js;h=4e4a26b0f02788bf1cc61447a8a617f8a7819ba5;hb=0b69a11b1055a6d3a3fd0719bdd58b5a235de0e4;hp=8ebdd3a47795146019785692135c610d12f43cc3;hpb=0b0ed9f44dacfa2cdc2400f27822c5be09e44857;p=roojs1 diff --git a/ux/DateDisplay.js b/ux/DateDisplay.js index 8ebdd3a477..4e4a26b0f0 100644 --- a/ux/DateDisplay.js +++ b/ux/DateDisplay.js @@ -4,9 +4,16 @@ Roo.form.DateDisplay = function(config){ + config.listener = config.listener || {}; + var c = Roo.apply({}, config); + delete c.listener; Roo.form.DateDisplay.superclass.constructor.call(this, config); - this.picker = new Roo.DatePicker( config ); + + Roo.log(c); + + + this.picker = new Roo.DatePicker( c ); this.addEvents({ /** @@ -52,9 +59,9 @@ Roo.extend(Roo.form.DateDisplay , Roo.form.TextField , { }, onSelect : function(sel) { - if (this.datepicker.value) { - this.setValue(this.datepicker.value.format('Y-m-d')); - this.fireEvent('select', this); + if (this.picker.value) { + this.setValue(this.picker.value.format('Y-m-d')); + //this.fireEvent('select', this); } }