开发者

ExtJS Datefield and change calling function

开发者 https://www.devze.com 2023-03-13 06:58 出处:网络
I am using ExtJS 3.3.1 and below is my code for a DateField. When the DateField is valid I would like it to call this function, however nothing is currently happening when I change the field.

I am using ExtJS 3.3.1 and below is my code for a DateField. When the DateField is valid I would like it to call this function, however nothing is currently happening when I change the field.

 new Ext.form.DateField({
        id: dt.id,
        applyTo: dt,
        "format": 'm/d/Y',
        invalidClass : 'ux-status-error',
        validateOnB开发者_运维技巧lur : true,
        valid: function () {refreshEmp();
        }
    }); 


I believe you have to configure the listener like this:

new Ext.form.DateField({
        ...
        listeners: {
          valid: function (datefield) {
            // Called when the datefield is valid
          }
        }
...
}); 
0

精彩评论

暂无评论...
验证码 换一张
取 消