[Input Masks Library] Issue when choosing comma as decimal separator in currencymask
Forge component by Labs
Application Type
Reactive

I have an input field of type Number. On this field I use: InputMasks\CurrencyMask with DecimalSeparator ",".

In the database the value of the field is : 0,29 

On the screen it is displayed as: 29,00

When I change the DecimalSeparator to "." I see: 0.29 displayed.

How can I fix 29,00 will be displayed as 0,29 ?

Hello,

I have a similar issue with the number mask. When I use a comma as decimal separator and I prefill the variable attached to the input mask with a number that contains a decimal, the input widget shows the value times 100:

Does anyone have a suggestion how to to resolve this issue?

Regards,
Alfio Esposito

Hi Alfio,

I have tried the same scenario and have got the same issue as you are facing when comma used as DecimalSeparator. Where as if we use "." instead of "," it is working fine. So, it looks like there is some issue with the component when we are using "," in DecimalSeparator. This issue need to be reported to forge, so team can look into this and resolve it.

Thanks & Kind Regards,

Sachin

Hello Raymond,

Hope you are doing good!

How you have stored comma into the database and where you are displaying the value? Could you please confirm these and if possible to look into the issue, please share your OML?

Thanks & Kind Regards,

Sachin 

I'm facing the same issue here. Does anyone know if this is a problem with the JS library itself or in the Outsystems Component? For now I'm using "." as Decimal separator and " " as GroupSeparator to display the right value, which is not the desired bevahiour for the client.

Trying to help here.

Maybe you could use javascript regexp as a quick workaround to format the value from the client side?


I can find many examples here: https://blog.abelotech.com/posts/number-currency-formatting-javascript/


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.