Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use or not the percentage symbol (%)? #719

Open
tiagocaus opened this issue Jul 22, 2019 · 1 comment
Open

How to use or not the percentage symbol (%)? #719

tiagocaus opened this issue Jul 22, 2019 · 1 comment

Comments

@tiagocaus
Copy link

tiagocaus commented Jul 22, 2019

How to allow inclusion of the % symbol in the field?

The same field is used as a fixed value and or a percentage value.

In the same field, it can be:

1,45 (one dollar and forty-five cents)
or
1,45% (one point forty-five percent)

Thank you.

@tiagocaus
Copy link
Author

$(document).ready(function() {
    $(".moeda").mask("#.##0,00%", {
        reverse: true,
        translation: {
            "%": {
                pattern: /\%/,
                optional: true
            }
        }
    });
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant