The result value varies with original value after updating the ID

33 Views Asked by At

on ctrl+v to the jqxmasked Input field (330)535-0505, it should remove the non-integers value, but while assigning edited value to Id output varies.. here is the code which I tried

$("#id").jqxMaskedInput({
    height: 20,
    width: 115,
    theme: theme,
    mask: '(###)###-#######'                    
});
$("#id").on("keyup", function () {
    var s = $("#id").val();
    alert(s);//shows ((33)0)5-35-0-505
    var t = s.replace(/[^0-9.]/g, "");        
        
    alert($("#id").val(t)); // but in UI it shows (305)505-55-0505          
});
0

There are 0 best solutions below