Roo/form/MonthField.js
authorAlan Knowles <alan@roojs.com>
Mon, 22 Oct 2012 09:30:26 +0000 (17:30 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 22 Oct 2012 09:30:26 +0000 (17:30 +0800)
Roo/form/MonthField.js

index 86c5830..e352bc0 100644 (file)
@@ -310,6 +310,9 @@ monthField.setValue('2006-5-4');
         }
         if(this.menu == null){
             this.menu = new Roo.menu.DateMenu();
+            this.menu.on(Roo.apply({}, this.menuListeners, {
+                scope:this
+            }));
         }
         
         Roo.apply(this.menu.picker,  {
@@ -326,9 +329,7 @@ monthField.setValue('2006-5-4');
             
         });
         
-        this.menu.on(Roo.apply({}, this.menuListeners, {
-            scope:this
-        }));
+       
         
         var m = this.menu;
         var p = m.picker;