Inputmask icon indicating copy to clipboard operation
Inputmask copied to clipboard

Decimal with prefix truncates first numeric byte

Open baileyjames9 opened this issue 11 years ago • 2 comments

I've configured my mask and it works great. I have 1 major error. When I set the initial value the first byte gets truncated (i.e. the val 12,345.67 gets masked as $2,345.67). I created a jsfiddle to quickly demonstrate the issue. What am I doing wrong?

http://jsfiddle.net/baileyjames9/jkxm0k5z/2/

My Mask: $("#amount").inputmask("decimal",{ radixPoint:".", groupSeparator: ",", digits: 2, autoGroup: true, prefix: '$' })

baileyjames9 avatar Dec 29 '14 17:12 baileyjames9

Just discovered the same issue. When there is no space after the prefix character, it will truncate the first character of the string. If you include a space after the prefix, it will not truncate. Basic example: http://jsfiddle.net/theandybob/t37m0txu/

AStoker avatar Dec 29 '14 21:12 AStoker

@baileyjames9 , @TheAndyBob ,

Fixed in the latest version

RobinHerbots avatar Jan 06 '15 10:01 RobinHerbots