roojs-debug.js
authorAlan Knowles <alan@akbkhome.com>
Fri, 2 Sep 2011 08:46:14 +0000 (16:46 +0800)
committerAlan Knowles <alan@akbkhome.com>
Fri, 2 Sep 2011 08:46:14 +0000 (16:46 +0800)
roojs-debug.js

index a85539f..365f652 100644 (file)
@@ -24619,7 +24619,14 @@ Roo.DatePicker = function(config){
             * @param {DatePicker} this
             * @param {Date} date The selected date
             */
-        select: true
+        'select': true,
+        /**
+            * @event monthchange
+            * Fires when the displayed month changes 
+            * @param {DatePicker} this
+            * @param {Date} date The selected month
+            */
+        'monthchange': true
     });
 
     if(this.handler){
@@ -25100,7 +25107,8 @@ Roo.extend(Roo.DatePicker, Roo.Component, {
     },
 
     // private
-    update : function(date){
+    update : function(date)
+    {
         var vd = this.activeDate;
         this.activeDate = date;
         if(vd && this.el){
@@ -25119,6 +25127,7 @@ Roo.extend(Roo.DatePicker, Roo.Component, {
                 return;
             }
         }
+        
         var days = date.getDaysInMonth();
         var firstOfMonth = date.getFirstDateOfMonth();
         var startingPos = firstOfMonth.getDay()-this.startDay;
@@ -25210,7 +25219,8 @@ Roo.extend(Roo.DatePicker, Roo.Component, {
         }
 
         this.mbtn.setText(this.monthNames[date.getMonth()] + " " + date.getFullYear());
-
+        this.fireEvent('monthchange', this, date);
+        
         if(!this.internalRender){
             var main = this.el.dom.firstChild;
             var w = main.offsetWidth;
@@ -25226,6 +25236,8 @@ Roo.extend(Roo.DatePicker, Roo.Component, {
                 this.update.defer(10, this, [date]);
             }
         }
+        
+        
     }
 });        /*
  * Based on: