diff options
| -rw-r--r-- | input/number.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/input/number.ts b/input/number.ts index 9a2c514..4f37eb7 100644 --- a/input/number.ts +++ b/input/number.ts @@ -101,6 +101,7 @@ export class WuiInputNumber { } this.el_input.type = "number" + this.el_input.step = "any" this.el_input.value = "" + this.opts.value let hint = "" @@ -174,7 +175,7 @@ export class WuiInputNumber { let target = ev.target as HTMLInputElement ev.preventDefault() - let newValue = parseInt(target.value) + let newValue = +target.value if (newValue === null) { this.el_input.style.backgroundColor = "lightsalmon" return false |
