I Want to separate numbers (3 by 3 Decimal from right). if our number is:
1000
i want it change to:
1.000
and if:
10000000
change to:
10.000.000
<input class="myInput" style="width: 100px!important" type="number" step="5000" value="0" min="0" max="99999999" />
$('.myInput').on('blur', function() {
var amount = $('.myInput').val().replace(/^\s+|\s+$/g, '');
if( ($('.myInput').val() != '') && (!amount.match(/^$/) )){
$('.myInput').val( parseInt(amount).toFixed(3));
}
});