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

index 6f489b6..4f4e398 100644 (file)
@@ -264,6 +264,7 @@ monthField.setValue('2006-5-4');
     // private
     parseDate : function(value){
         if(!value || value instanceof Date){
+            value = Date.parseDate(value.format('Y-m-01'));
             return value;
         }
         var v = Date.parseDate(value, this.format);
@@ -271,6 +272,7 @@ monthField.setValue('2006-5-4');
             v = Date.parseDate(value, 'Y-m-d');
         }
         if (v) {
+            // 
             v = Date.parseDate(date.format('Y-m-01'));
         }