Roo/DatePicker.js
authorAlan Knowles <alan@roojs.com>
Mon, 22 Oct 2012 09:49:46 +0000 (17:49 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 22 Oct 2012 09:49:46 +0000 (17:49 +0800)
Roo/DatePicker.js

index 71abd86..f4a274e 100644 (file)
@@ -170,6 +170,10 @@ Roo.extend(Roo.DatePicker, Roo.Component, {
      */
     setValue : function(value){
         var old = this.value;
+        if (typeof(value) == 'undefined') {
+            value = new Date();
+        }
+        
         if (typeof(value) == 'string') {
          
             value = Date.parseDate(value, this.format);