我正在使用 ExtJs4.1,这是我的示例。不以这种方式调用“calendarioChange”:
Ext.define('App.view.atendimento.Agenda', {
  extend: 'Ext.window.Window', 
  maximized: true,
  bodyPadding: 4,
  constrain: true,
  layout: 'hbox',
  items:[
    {
        xtype: 'container',
        width: 300,
        layout: 'vbox',
        items: [
            {
                xtype: 'datepicker',
                handler: this.calendarioChange
            }
        ]
    }
  ],
  calendarioChange: function(picker, date){
    alert('changed');
  }
});
但以这种方式有效:
 xtype: 'datepicker',
     handler: function(picker, date){
                   alert('changed');
              }
我在第一种情况下缺少什么?
谢谢。