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

Forge Component
(38)
Published on 22 Apr by Marcelo Ferreira
38 votes
Published on 22 Apr by Marcelo Ferreira

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

Solution

Still having problems with it?

The component was updated in the meantime might be fixed now

Solution