Hello,
We have the following issue when using the ngx-mask for decimal numbers:
-ngx-mask version: 9.1.2
When the user enters the number manually, we get the correct result:
However, when we set the same value programmatically we get the following results:
Thank you so much,
Dimitris
the same issue happens to me.
the different I setting configuration from import module with
NgxMaskModule.forRoot({decimalMarker: ',', thousandSeparator: '.'})
any suggestions for this matter?
Thanks
Yudi
Not sure if it is the best way to deal with this problem, but I have done the following
First: Set the FormControl with a value that the mask accept
this.myFormGroup.get('price').setValue('52,99');
and then set the value again with the option emitModelToViewChange as false
this.myFormGroup.get('price').setValue(52.99, {emitModelToViewChange: false});
Hello,
After several tests, the only way that worked as expected was by adding "decimalMarker" directly in "input":
<input type="text" prefix="R$ " mask="separator.6" thousandSeparator="." decimalMarker="," inputmode="numeric" />
Most helpful comment
Hello,
After several tests, the only way that worked as expected was by adding "decimalMarker" directly in "input":
<input type="text" prefix="R$ " mask="separator.6" thousandSeparator="." decimalMarker="," inputmode="numeric" />