I tried to restrict input to accept numbers only, it works fine using keyboard numbers but when using (keypad at the right) it failed.
What I tried:
$("#NUMBER").keydown(function (e) {
return( Boolean(String.fromCharCode(e.keyCode).match(/[0-9]+/g)) );
});
Demo: https://jsfiddle.net/9qwv5t9j/
Edit: I tested answer here:https://stackoverflow.com/a/13196983/3599237 and (Demo: https://jsfiddle.net/9qwv5t9j/3/) but its not working.