RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.39k stars 2.17k forks source link

Comma character "," triggers the jump to radix even though 'radixPoint': '.' is set to period "." symbol #2682

Closed wilsmex closed 1 year ago

wilsmex commented 1 year ago

My users enter their currency in by typing the comma. For example they type in order: 1,345 For 'one thousand three hundred forty-five'.

As soon as they type the comma, the cursor jumps to the radix decimal, so they end up typing 1.34 for their currency price.

If I manually set the 'radixPoint' to a '.' (period), then a comma character should not trigger/jump the cursor to the radix. How can I 'turn off' the comma trigger altogether or a workaround for this issue?

RobinHerbots commented 1 year ago

@wilsmex ,

Have a look at https://github.com/RobinHerbots/Inputmask/blob/5.x/README_numeric.md#substituteradixpoint

wilsmex commented 1 year ago

@RobinHerbots Ah yes, that is exactly what I was looking for! Thx. Closing issue out.