JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="formattedNumberField" value="" />
JavaScript
//jQuery
$("#formattedNumberField").on('keyup', function(evt){
if (evt.which != 110 ){//not a fullstop
var n = parseFloat($(this).val().replace(/\,/g,''),10);
$(this).val(n.toLocaleString());
}
});