-
-
Save pavan-idapalapati/6388213c1042101dd3578d19f553024d to your computer and use it in GitHub Desktop.
Android keypad event preventDefault solution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#test').on('input',function () { | |
var inputText = $(this).val(); | |
console.log(inputText); | |
var resultText = inputText.replace(/[^0-9]/g, ''); | |
$(this).val(resultText); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment