jquery-meiomask icon indicating copy to clipboard operation
jquery-meiomask copied to clipboard

Decimals ignored when they are zero

Open mmaga opened this issue 12 years ago • 2 comments

Hi Fábio,

Thank you very much for the really good plugin!

It seems there is a problem handling numbers when they have zeros for decimals. When i set the value of the input tag as 1500 using the mask '{"mask":"99.9999","type":"reverse"}' , what I get is "15.00" and not "1500.00", as supposed to for a number. Maybe I'm messing up my data because the main rationale of the plugin is set for string manipulation.

Let me know if I can help.

Marcelo

mmaga avatar Jul 01 '12 12:07 mmaga

I dont see the issue here, the result is exactly as your mask is specified.

blowsie avatar Apr 01 '14 11:04 blowsie

@mmaga your issue exists!

Try to explain better:

  • use the mask {"mask":"99.9999","type":"reverse"}
  • if you pass a value with decimals (eg. 1234.55) all works fine;
  • if you pass a value with zero decimals (eg. 1234), the mask returns "12.34" (wrong value) and not "1234.00"

adaniello avatar Mar 07 '17 16:03 adaniello