JavaScript solo permite caracteres numéricos
$('#MyTextInput').on('propertychange input', function () {
let result = $(this).val().replace(/[^\d]+/g, '');
$(this).val(result);
});
Syntax Error