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"
|
||||
min="1"
|
||||
:max="isThisMonth ? maxGddThisMonth : maxGddLastMonth"
|
||||
:formatter="numberFormat"
|
||||
></b-form-input>
|
||||
</b-input-group>
|
||||
<div
|
||||
@ -103,7 +104,11 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
numberFormat(value) {
|
||||
return (this.form.amount = value.replace(/\.|,/, ''))
|
||||
},
|
||||
submit() {
|
||||
this.numberFormat(this.form.amount)
|
||||
if (this.form.id) {
|
||||
this.$emit('update-contribution', this.form)
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user