Roo/bootstrap/MonthField.js
authorEdward <edward@roojs.com>
Mon, 31 Aug 2015 05:55:18 +0000 (13:55 +0800)
committerEdward <edward@roojs.com>
Mon, 31 Aug 2015 05:55:18 +0000 (13:55 +0800)
Roo/bootstrap/MonthField.js

index 200a3a4..02d3ccf 100644 (file)
@@ -264,9 +264,15 @@ Roo.extend(Roo.bootstrap.MonthField, Roo.bootstrap.Input,  {
             case 39: // right
                 dir = e.keyCode == 37 ? -1 : 1;
                 
-                d = new Date();
-                year = d.getFullYear();
-                day = 1;
+                this.vIndex = this.vIndex + dir;
+                
+                if(this.vIndex < 0){
+                    this.vIndex = 0;
+                }
+                
+                if(this.vIndex > 11){
+                    this.vIndex = 11;
+                }
                 
                 Roo.log(year);
                 Roo.log(day);