Input mask question

Home Forums Porto Admin – Responsive HTML5 Template Input mask question

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #10044611

    I am trying to use input masks for a number with two decimals. Here is what I assumed would work:

    <input id="amount" data-plugin-masked-input data-input-mask="9999.99" placeholder="00.00" class="form-control">

    The problems:

    (1) When I put a decimal ( . ) in the mask, it does not allow me to enter any value. For example, if I put in “9999,99”, I can enter 1234,56. But if I put in “9999.99”, I cannot enter anything at all.

    (2) My actual use case requires that I am able to enter any value with two decimal places. For example, these need to all be valid: 1.23, 12.34, 123.45, 1234.56. However, I am limited to entering 4 digits to the left of the decimal if I use 9999.99

    I would love to have more documentation on “data-plugin-masked-input data-input-mask”. Thanks


    Hello, the mask works perfectly for fixed number, such as phone, zipcode, etc… In that case you mentioned you need to format the numbers on keyup, so please use the following JS code:

    You may also find some other plugins (that are not included on Porto and have some different functions), like this one:

    Kind Regards.

Viewing 2 posts - 1 through 2 (of 2 total)

This topic is marked as "RESOLVED" and can not rceive new replies.