ux/DateDisplay.js
authorAlan Knowles <alan@roojs.com>
Sun, 26 Aug 2012 13:19:18 +0000 (21:19 +0800)
committerAlan Knowles <alan@roojs.com>
Sun, 26 Aug 2012 13:19:18 +0000 (21:19 +0800)
ux/DateDisplay.js

index bf9c3cb..a4d20de 100644 (file)
@@ -51,8 +51,12 @@ Roo.extend(Roo.form.DateDisplay , Roo.form.TextField ,  {
         
     },
     onSelect : function(sel) {
-        this.fireEvent('select', this);
-        this.setValue(this.datepicker)
+        
+        if (this.datepicker.value) {
+            this.setValue(this.datepicker.value.format('Y-m-d'));
+            this.fireEvent('select', this);
+        }
+        
         
      
     }