Cant get the money mask to work
I am getting irregular results and I am not sure if it is me or the plugin
I have a value: 2520000
I apply a mask: $('.amount_total').mask('$##,###,###'); and: $('.amount_total').mask('$##,###,###.##');
Result: $25,200,00
I also tried: $('.amount_total').mask('$#,###'); and: $('.amount_total').mask('$#,###.##');
Result: $2,5200,00 and: $2,520.000
I also tried: $('.amount_total').mask('$000,000,000'); and: $('.amount_total').mask('$000,000,000.00');
Result: $252,000,0
What am I doing wrong?
The problem is you should use {reverse: true} option. And using $ get some problems or anothers issues.
If you want a float number you should use this mask: $('.amount_total').mask("#.##0,00", {reverse: true});
Hello! I have a similar problem.
Tried to use both masks:
$('.mask-value').mask("#.##0,00", {reverse: true});
$('.mask-value').mask('000.000.000.000.000,00', {reverse: true});
to make my currency field work. But when I type the values, if it's a value like 10.000,00 ir generates only 1,00000000.
And if it's a value with several numbers, like 19.952,25 it shows only 199,52. And if I keep typing, it resets the value. Also, it does not accept the character "0".
Best regards, Fernando.