Roo/bootstrap/PhoneInput.js
authorjohn <john@roojs.com>
Mon, 29 Oct 2018 08:19:46 +0000 (16:19 +0800)
committerjohn <john@roojs.com>
Mon, 29 Oct 2018 08:19:46 +0000 (16:19 +0800)
Roo/bootstrap/PhoneInput.js

index 3c49035..b6bbea4 100644 (file)
@@ -557,6 +557,17 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, {
             this.setValue(this.getValue());
         },
         
+        onKeyUp : function(e){
+            
+            if(this.allowed.indexOf(String.fromCharCode(e.getCharCode())) === -1){
+                e.stopEvent();
+            }
+            
+            Roo.log(this.getValue());
+            
+            this.setValue(this.getValue());
+        }
+        
         
         
 });
\ No newline at end of file