From abff82cb6e032c3675de6daa52286904f25225b2 Mon Sep 17 00:00:00 2001 From: john Date: Mon, 29 Oct 2018 16:19:46 +0800 Subject: [PATCH] Roo/bootstrap/PhoneInput.js --- Roo/bootstrap/PhoneInput.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Roo/bootstrap/PhoneInput.js b/Roo/bootstrap/PhoneInput.js index 3c4903502e..b6bbea46d1 100644 --- a/Roo/bootstrap/PhoneInput.js +++ b/Roo/bootstrap/PhoneInput.js @@ -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 -- 2.39.2