Inputmask: Decimal separator conversion

Created on 20 May 2015  路  15Comments  路  Source: RobinHerbots/Inputmask

I'm using the "numeric" mask with this configuration:

$(".input-mask").inputmask('numeric', {
    radixPoint: '.',
    autoUnmask: true,
    rightAlign: false,
    unmaskAsNumber: true,
    removeMaskOnSubmit: true
});

When I try to press "," (comma), instead of prevent it, I would replace it with "." (dot) ... is it possibile?

Thank you

Numerics

All 15 comments

@billmn ,

Added

:+1:

If I empty a field and tried to use "," (comma) as a decimal separator, the script prevent it ... is it normal?

@billmn ,

Can you make a jsfiddle for it as I don't see the problem here.

Sure! https://jsfiddle.net/8ho816gv/

If you try to edit a populated field "comma" being replaced with "dot" ... with an empty field, the script prevent to type "comma"

In which browser are you testing?

Chrome 43.0.2357.132 64bit on OS X Yosemite

@billmn ,

So you cannot type a comma in the first field? Can you try in another browser.

I tried with windows 8. I will try in Linux this evening.

Do you get something in the console?

With Safari and Firefox works fine!

@billmn ,

I will try to find a hackintosh to install Chrome on osx yosemite.

@billmn ,

Now I see what you mean. Overtyping 1234.56 with komma does not work.

I will fix that

@billmn ,

Fixed with the latest commit

Great work!!!
thank you

Hi there! I have same problem!
I can`t type comma if I set "radixPoint: '.'" option...
Can we solve this? :)
Version: 3.3.6

@Dekabrist ,

I can solve that, but can you describe the defferent steps so it is clear what exactly I need to fix. (create a new issue for it)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

drolsen picture drolsen  路  3Comments

webmastervinay picture webmastervinay  路  4Comments

pikaclint picture pikaclint  路  3Comments

RobinHerbots picture RobinHerbots  路  4Comments

TiGR picture TiGR  路  3Comments