|
|
@@ -182,14 +182,16 @@ |
|
|
|
if (e.currentTarget.value.trim() === '') { |
|
|
|
return; |
|
|
|
} |
|
|
|
let newValue; |
|
|
|
try { |
|
|
|
numberInput.value = parse(e.currentTarget.value, options.parse) |
|
|
|
.toString(); |
|
|
|
// TODO group digits function from system. |
|
|
|
newValue = parse(e.currentTarget.value, options.parse) |
|
|
|
} catch (err) { |
|
|
|
console.error(err); |
|
|
|
e.currentTarget.setCustomValidity('Invalid name.'); |
|
|
|
} |
|
|
|
|
|
|
|
numberInput.value = newValue.toString(); |
|
|
|
// TODO group digits function from system. |
|
|
|
}); |
|
|
|
|
|
|
|
addTensDashesCheckbox.addEventListener('change', (e) => { |
|
|
|