Roo/bootstrap/form/TimeField.js
authorleon <leon@roojs.com>
Wed, 9 Aug 2023 07:04:02 +0000 (15:04 +0800)
committerleon <leon@roojs.com>
Wed, 9 Aug 2023 07:04:02 +0000 (15:04 +0800)
Roo/bootstrap/form/TimeField.js

index 3109418..cdf2d7f 100644 (file)
@@ -481,6 +481,31 @@ Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input,  {
         this.update();
     },
 
+    setRawValue: function(v)
+    {
+        var t = this.parseTime(v);
+
+        if(!t) {
+            this.time = this.value = this.hiddenField.value =  '';
+            if(this.rendered){
+                this.inputEl().dom.value = (v === null || v === undefined ? '' : v);
+            }
+            return;
+        }
+
+        this.value = this.hiddenField.value = t.dateFormat('H:i:s');
+
+        v = this.translateTime(t);
+
+        if(this.rendered){
+            this.inputEl().dom.value = (v === null || v === undefined ? '' : v);
+        }
+
+        this.time = t;
+
+        this.update();
+    },
+
     getValue: function()
     {
         return this.value;