Reputation: 97
I'm using Robin Herbot's inputmask jquery plugin, and I am getting output as expected but I want it with commas i.e. 12,345.67 and with 2 decimals.
$('#currency').inputmask({'mask':"9{0,10}[.9{0,2}]", greedy: false});
Upvotes: 4
Views: 7952
Reputation: 1010
I have managed to make it working with following code
$('#currency').inputmask({
'alias': 'decimal',
'groupSeparator': ',',
'autoGroup': true,
'digits': 2,
'digitsOptional': false,
'placeholder': '0.00'
});
so the actual output looks like this
12,312,311.00
Hope this helps
Upvotes: 9