Wardhana Wardhana - 1 year ago 166
Javascript Question

How to change format decimal using jquery mask input?

I am using Jquery input mask. I have a problem to change decimal format number. If I using

$(selector).inputmask({ 'alias': 'decimal', 'groupSeparator': '.', 'autoGroup': true, 'rightAlign': false });
the decimal result is
. How to change to format

Answer Source

You can set the radixPoint to , and groupSeparator to ..

    'alias': 'decimal',
    'radixPoint': ',',
    'groupSeparator': '.',
    'autoGroup': true,
    'rightAlign': false,
    'numericInput': true

Please also check this example: http://codepen.io/rooyva/pen/1f20a3883258d306b5098f03ab30517f/

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download