mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add formatter on input amount replace point and comma
This commit is contained in:
parent
f95831d6a0
commit
ff2ecd5363
@ -58,6 +58,7 @@
|
|||||||
type="number"
|
type="number"
|
||||||
min="1"
|
min="1"
|
||||||
:max="isThisMonth ? maxGddThisMonth : maxGddLastMonth"
|
:max="isThisMonth ? maxGddThisMonth : maxGddLastMonth"
|
||||||
|
:formatter="numberFormat"
|
||||||
></b-form-input>
|
></b-form-input>
|
||||||
</b-input-group>
|
</b-input-group>
|
||||||
<div
|
<div
|
||||||
@ -103,7 +104,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
numberFormat(value) {
|
||||||
|
return (this.form.amount = value.replace(/\.|,/, ''))
|
||||||
|
},
|
||||||
submit() {
|
submit() {
|
||||||
|
this.numberFormat(this.form.amount)
|
||||||
if (this.form.id) {
|
if (this.form.id) {
|
||||||
this.$emit('update-contribution', this.form)
|
this.$emit('update-contribution', this.form)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user