ngx-mask
ngx-mask copied to clipboard
number input not parsed/displayed correctly with global decimalMarker/thousandSeparator config
If decimalMarker/thousandSeparator is configured globally, input decimal numbers are not parsed/displayed correctly
Using:
export const maskConfig: Partial<IConfig> = {
thousandSeparator: ".",
decimalMarker: ","
};
An input number 1234.56
(actual ts number value) becomes 123.456
in the input field, expected is 1.234,56
.
It works correctly though, if thousandSeparator/decimalMarker is configured explicitly at the input field.
The issue can be viewed here: https://stackblitz.com/edit/ngx-mask-hwj1ep
Me too!
From what I saw the model has to be in accordance with the config ... =/ Ex: '1000,58' = 1.000,58
My backend sends a floating or decimal number. The library still doesn't understand that. ¬¬'' could work like the php number_format (decimal_value, ",", ".") would be great!
https://github.com/JsDaddy/ngx-mask/issues/680
https://www.npmjs.com/package/ngx-currency
Me too!
@lkoe @norivanoliveira @lramondev Thanks for your using Ngx-Mask. Please update to latest version. It example, all work as expected - https://stackblitz.com/edit/angular-nr36ab?file=src%2Fmain.ts
@lkoe @norivanoliveira @lramondev Thanks for your using Ngx-Mask. Please update to latest version. It example, all work as expected - https://stackblitz.com/edit/angular-nr36ab?file=src%2Fmain.ts
Not Working. input an integer value example: 1000 expected: 1.000,00 result: 1.000
@lramondev It example - https://stackblitz.com/edit/angular-2dzd4x?file=src%2Fmain.ts We add leadZero in version 16.1.3 All work as you needed
Nice. Thanksss!