Roo/bootstrap/PhoneInput.js
[roojs1] / 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