JSFiddle - React, Tailwind, and code Playground

HTML

<label>กรอกตัวเลขอารบิค</label>
<input id="nump"></input>

JavaScript

$(document).ready(function(){
    $('#nump').keypress(function(e){
    if(e.keyCode>=48 && e.keyCode<=58)
    {
     var flag="0x0E"; //UTF-8 
     var t=flag.concat(e.keyCode+2);
     var buff=$(this).val();
     $(this).val(buff+String.fromCharCode(t));
     e.preventDefault();
    }
    
});
});