diff --git a/resources/views/component/form-penilai.blade.php b/resources/views/component/form-penilai.blade.php index 148682d..4008502 100644 --- a/resources/views/component/form-penilai.blade.php +++ b/resources/views/component/form-penilai.blade.php @@ -302,9 +302,20 @@ }); // Tambahkan event listener untuk currency format - newNPWRow.querySelectorAll('.currency-format').forEach(input => { - input.addEventListener('input', function() { - formatCurrency(this); + newNPWRow.querySelectorAll('.currency').forEach(input => { + input.addEventListener('change', function() { + window.IMask(this, { + mask: Number, // enable number mask + // other options are optional with defaults below + scale: 0, // digits after point, 0 for integers + thousandsSeparator: ".", // any single char + padFractionalZeros: false, // if true, then pads zeros at end to the length of scale + normalizeZeros: true, // appends or removes zeros at ends + radix: ",", // fractional delimiter + mapToRadix: ["."], // symbols to process as radix + + autofix: true, + }); }); });