I want to format input while I type in a european format for numbers which is like "100.000,00"
$(input).keyup(function (event) {
// skip for arrow keys
if (event.which >= 37 && event.which <= 40) return;
// format number
$(this).val(function (index, value) {
return value.replace(/\D/g, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
});
});
I've tried this one but it's only for ","
i want pure jquery not plugins or anything else