HTML Input type number Thousand separator

Using autoNumeric plugin you can made a field as numeric input with different separators.

Include plugin:

<script src="https://stackoverflow.com/questions/31867551/~/Scripts/autoNumeric/autoNumeric.min.js" type="text/javascript"></script>

Html:

 <input type="text" id="DEMO" data-a-sign="" data-a-dec="," data-a-sep="." class="form-control"> 

Script:

<script>
 jQuery(function($) {
$('#DEMO').autoNumeric('init');   
 });
</script>

You can type only number, if you input 100000,99 you will see 100.000,99.

More: https://github.com/autoNumeric/autoNumeric

Leave a Comment