mirror of
https://github.com/openclassify/openclassify.git
synced 2026-03-09 09:45:26 -05:00
8 lines
270 B
JavaScript
8 lines
270 B
JavaScript
$("input[data-type='currency']").on('blur', function() {
|
|
const value = this.value.replace(/,/g, '');
|
|
this.value = parseFloat(value).toLocaleString('en-US', {
|
|
style: 'decimal',
|
|
maximumFractionDigits: 2,
|
|
minimumFractionDigits: 2
|
|
});
|
|
}); |