Roo/bootstrap/DateField.js
authorAlan Knowles <alan@roojs.com>
Wed, 20 Apr 2016 10:01:19 +0000 (18:01 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 20 Apr 2016 10:01:19 +0000 (18:01 +0800)
Roo/bootstrap/DateField.js

index 66ff88f..736069c 100644 (file)
@@ -891,9 +891,10 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
                 new_month = (new_month + 12) % 12;
         } else {
             // For magnitudes >1, move one month at a time...
-            for (var i=0; i<mag; i++)
+            for (var i=0; i<mag; i++) {
                 // ...which might decrease the day (eg, Jan 31 to Feb 28, etc)...
                 new_date = this.moveMonth(new_date, dir);
+            }
             // ...then reset the day, keeping it in the new month
             new_month = new_date.getUTCMonth();
             new_date.setUTCDate(day);