Merge pull request #3564 from lindhork/currency_decimal_separator

added replacement from comma to dot
This commit is contained in:
Lauri Ojansivu 2021-02-12 21:43:47 +02:00 committed by GitHub
commit adf94b5e21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -121,7 +121,8 @@ CardCustomField.register('cardCustomField');
{
'submit .js-card-customfield-currency'(event) {
event.preventDefault();
const value = Number(this.find('input').value, 10);
// To allow input separated by comma, the comma is replaced by a period.
const value = Number(this.find('input').value.replace(/,/i, '.'), 10);
this.card.setCustomField(this.customFieldId, value);
},
},