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

wrong parsing #257

Open
neurobug opened this issue Nov 14, 2018 · 1 comment
Open

wrong parsing #257

neurobug opened this issue Nov 14, 2018 · 1 comment

Comments

@neurobug
Copy link

When I set an input whit the following options:

{thousands: '.', decimal:',', precision: 0 ....}

and the value entered in the input is 4444.444.555 it takes 555 as decimal part. But there is not decimal part in that value. The dot is thousands separator..

@Ehsan-Dizangi
Copy link

Hi @neurobug,
This may help you

$(".input-mask").maskMoney({thousands:',', decimal:'.', allowZero: true, precision: 0});
var inputValue = $(".input-mask").val();
var resualt = parseFloat(inputValue.replace(/[^\d\.]*/g, ''));

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

2 participants