[Custom Masks] MaskNumber returns incorrect value with input that containts 3 decimals.

[Custom Masks] MaskNumber returns incorrect value with input that containts 3 decimals.

  
Forge Component
(24)
Published on 14 Nov (3 days ago) by Caio Santana Magalhães
24 votes
Published on 14 Nov (3 days ago) by Caio Santana Magalhães

Hi,


I am currently using the MaskNumber widget with the following input:


DecimalDigits: 5

DecimalSeparator: ","

GroupSeparator: "."


With input values like: 0.0054, 0.0104, 0.03 the mask works correctly. But it goes wrong with input values like 0.026 and 0.014. When using these input values the return values are 26 and 14 instead of 0,026 and 0,014. Could you please take a look at this?


Kind Regards,

Jordi

I don't quite sure what you're trying to achieve but...

By default it should be:

DecimalSeparator: "."

GroupSeparator: ","

Ex: 1.000,00 = 1 thousand.


In your case your using the other way around, so your input should be:

0,026 and 0,014 then you'll get 0,026 and 0,014