From d59dc76eb9eb737d537e19808f79002ecccaa262 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Tue, 1 Sep 2020 15:52:17 +0300 Subject: [PATCH] Fixed #460 - inputNumber cannot set value bigger than 99.999 for an ES locale --- src/components/inputnumber/InputNumber.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/inputnumber/InputNumber.vue b/src/components/inputnumber/InputNumber.vue index 8f02a2881..99482eb5d 100755 --- a/src/components/inputnumber/InputNumber.vue +++ b/src/components/inputnumber/InputNumber.vue @@ -190,7 +190,7 @@ export default { }, getGroupingExpression() { const formatter = new Intl.NumberFormat(this.locale, {useGrouping: true}); - this.groupChar = formatter.format(1000).trim().replace(this._numeral, ''); + this.groupChar = formatter.format(1000000).trim().replace(this._numeral, ''); return new RegExp(`[${this.groupChar}]`, 'g'); }, getMinusSignExpression() { @@ -266,7 +266,7 @@ export default { let currentValue = this.parseValue(this.$refs.input.$el.value) || 0; let newValue = this.validateValue(currentValue + step); - this.updateInput(newValue, 'spin'); + this.updateInput(newValue, null, 'spin'); this.updateModel(event, newValue); }, onUpButtonMouseDown(event) { @@ -475,7 +475,7 @@ export default { return false; }, - insert(event, text, sign = {}) { + insert(event, text, sign = { isDecimalSign: false, isMinusSign: false }) { let selectionStart = this.$refs.input.$el.selectionStart; let selectionEnd = this.$refs.input.$el.selectionEnd; let inputValue = this.$refs.input.$el.value.trim();