ngx-mask icon indicating copy to clipboard operation
ngx-mask copied to clipboard

How to change "." for "," in percent input?

Open mkydouglas opened this issue 5 years ago • 3 comments

Hey guys, I'm using the input: And when I type a fractional number show something like this: 1.5% But I'm from Brazil and I need to change the dot for the comma, to show something like this: 1,5%

Is there any possibility to do that?

Anywhay, thanks a lot!

mkydouglas avatar Jan 24 '20 19:01 mkydouglas

I'm not sure this actually works how you expect even with a dot character at the moment If you type 1.5 (on screen you would see 1.5%) I presume you would be expecting your actual value in the angular from control model to be 1.5 (1 point 5), however, the value stored in the model is actually 15

I think this may need clarification from the devs on expected behaviour of the percent mask

ColinMorris83 avatar Jan 25 '20 00:01 ColinMorris83

Hello,

Any news about this issue? Facing the same problem.

Kr, Henry

henryKukk avatar Nov 27 '20 07:11 henryKukk

Facing the same problem.

I'm using mask="percent.2" but I need change "." for ","

camp0sfer avatar Feb 11 '22 18:02 camp0sfer

I am facing the same issue - changing "." for ","

mlar1997 avatar Jun 22 '23 11:06 mlar1997

@mlar1997 @mkydouglas @camp0sfer @henryKukk @ColinMorris83 Thanks for your using Ngx-Mask. Please update to latest version. It example, all work as expected - https://stackblitz.com/edit/angular-lkvxsb?file=src%2Fmain.ts

andriikamaldinov1 avatar Aug 03 '23 14:08 andriikamaldinov1