mirror of
https://github.com/getformwork/formwork.git
synced 2025-01-17 21:49:04 +01:00
Allow leading zeros for decimal numbers in DurationInput
This commit is contained in:
parent
ca438fa3b7
commit
7a02f7e961
2
admin/assets/js/app.min.js
vendored
2
admin/assets/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
@ -136,8 +136,8 @@ export default function DurationInput(input, options) {
|
||||
}
|
||||
innerInputs[name] = innerInput;
|
||||
innerInput.addEventListener('input', function () {
|
||||
if (this.value.length > 1) {
|
||||
this.value = this.value.replace(/^0+/, '');
|
||||
while (this.value.charAt(0) === '0' && this.value.length > 1 && !this.value.charAt(1).match(/[.,]/)) {
|
||||
this.value = this.value.slice(1);
|
||||
}
|
||||
while (this.value > Utils.getMaxSafeInteger()) {
|
||||
this.value = this.value.slice(0, -1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user