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

index 45a348f..1f086f0 100644 (file)
@@ -426,6 +426,20 @@ Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input,  {
         
     },
 
+    // return false when it fails
+    parseTime : function(value)
+    {
+        if(!value) {
+            return false;
+        }
+        if(value instanceof Date){
+            return value;
+        }
+        var v = Date.parseDate(value, 'H:i:s');
+
+        return (typeof(v) == 'undefined') ? false : v;
+    },
+
     setValue: function(v)
     {
         this.value = this.hiddenField.value =  '';