Roo/DatePicker.js
authorAlan Knowles <alan@roojs.com>
Mon, 22 Oct 2012 08:02:52 +0000 (16:02 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 22 Oct 2012 08:02:52 +0000 (16:02 +0800)
Roo/DatePicker.js

index e272f6a..95e764b 100644 (file)
@@ -170,6 +170,10 @@ Roo.extend(Roo.DatePicker, Roo.Component, {
      */
     setValue : function(value){
         var old = this.value;
+        if (typeof(value) == 'string') {
+            value = Date.parseDate(value, 'Y-m-d');
+        }
+        
         this.value = value.clearTime(true);
         if(this.el){
             this.update(this.value);