Roo/bootstrap/PhoneInput.js
[roojs1] / Roo / bootstrap / PhoneInput.js
index 43c2956..9797c2d 100644 (file)
@@ -81,6 +81,7 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, {
             var input =  {
                 tag: 'input',
                 id : id,
+                type: 'number',
                 maxlength: this.max_length,
                 cls : 'form-control tel-input',
                 autocomplete: 'new-password'
@@ -550,7 +551,7 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, {
             var c = e.getCharCode();
             
             if(
-                    (String.fromCharCode(c) == '.' || String.fromCharCode(c) == '-') &&
+                    [",", "."].indexOf(String.fromCharCode(c)) > -1 ||
                     this.allowed.indexOf(String.fromCharCode(c)) === -1
             ){
                 e.stopEvent();