jQuery-Mask-Plugin icon indicating copy to clipboard operation
jQuery-Mask-Plugin copied to clipboard

Weight mask

Open cassianotartari opened this issue 6 years ago • 0 comments

Hello!

I'm trying to create a weight mask with 3 decimals precision without success.

The requisites:

  1. Comma separating the last 3 digits
  2. Maximum of 8 integer values
  3. Allow to type comma
  4. When input value is set by html with a float number, mask it, for example value="0.5 mask as the input as 0,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

cassianotartari avatar Apr 02 '19 13:04 cassianotartari