extjs3 - ExtJs datepicker listener -
i have datefield on form:
var intform = new ext.formpanel({ width: 350, autoheight: true, bodystyle: 'padding: 10px 10px 10px 10px;', labelwidth: 70, defaults: { anchor: '95%', allowblank: false, msgtarget: 'side' },items:[{ xtype:'datefield', fieldlabel: 'Выберете дату', name: 'intdate', anchor:'80%', maxvalue: new date(), listeners:{ 'change': function(this,newvalue,oldvalue){ alert('newvalue'); } } }] });
but whe start application error:
syntaxerror: missing formal parameter 'change': function(this,newvalue,oldvalue){
i cant use listeners when create datefield this, gonna use variable create datefield?
you have syntax error, cannot use this
parameter name change field
or other name
var intform = new ext.formpanel({ width : 350, autoheight : true, bodystyle : 'padding: 10px 10px 10px 10px;', labelwidth : 70, defaults : { anchor : '95%', allowblank : false, msgtarget : 'side' }, items : [{ xtype : 'datefield', fieldlabel : 'Выберете дату', name : 'intdate', anchor : '80%', maxvalue : new date(), listeners : { 'change' : function(field, newvalue, oldvalue) { alert('newvalue'); } } }] });
Comments
Post a Comment