Roo/bootstrap/form/TimeField.js
authorleon <leon@roojs.com>
Wed, 9 Aug 2023 06:48:01 +0000 (14:48 +0800)
committerleon <leon@roojs.com>
Wed, 9 Aug 2023 06:48:01 +0000 (14:48 +0800)
Roo/bootstrap/form/TimeField.js

index 2afd1b9..f2fae84 100644 (file)
@@ -444,6 +444,15 @@ Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input,  {
     {
         var t = this.parseTime(v);
 
+        if(!t) {
+            this.time = this.viewDate = this.value = this.hiddenField.value =  '';
+            if(this.rendered){
+                this.inputEl().dom.value = (v === null || v === undefined ? '' : v);
+                this.validate();
+            }
+            return;
+        }
+
         this.value = this.hiddenField.value =  '';
         var v = this.time.format(this.format);
     },