Roo/bootstrap/DateSplitField.js
authoredward <edward@roojs.com>
Tue, 19 Apr 2016 05:10:27 +0000 (13:10 +0800)
committeredward <edward@roojs.com>
Tue, 19 Apr 2016 05:10:27 +0000 (13:10 +0800)
Roo/bootstrap/DateSplitField.js

index f03598f..955637b 100644 (file)
@@ -219,18 +219,20 @@ Roo.extend(Roo.bootstrap.DateSplitField, Roo.bootstrap.Component,  {
     
     setValue : function(v, format)
     {
+        this.inputEl().setValue(v);
+        
         var f = format || (this.yearFormat + '-' + this.monthFormat + '-' + this.dayFormat);
         
         var d = Date.parseDate(v, f);
         
-        Roo.log(d);
+        if(!d){
+            return;
+        }
         
         this.dayField.setValue(d.format(this.dayFormat));
         this.monthField.setValue(d.format(this.monthFormat));
         this.yearField.setValue(d.format(this.yearFormat));
         
-        this.inputEl().setValue(d.format(f));
-        
         this.validate();
         
         return;