jQuery-Mask-Plugin
jQuery-Mask-Plugin copied to clipboard
Weight mask
Hello!
I'm trying to create a weight mask with 3 decimals precision without success.
The requisites:
- Comma separating the last 3 digits
- Maximum of 8 integer values
- Allow to type comma
- When input value is set by html with a float number, mask it, for example
value="0.5mask as the input as0,500
Can someone help?
The best that I've tried so far is:
$('.weight').mask("##.###.##0,000", {reverse: true});
But when the input value is 0.5 the input is displaying 05.
I'm using the last version of jmask 1.14.15