plentz / jquery-maskmoney

jQuery plugin to mask data entry in the input text in the form of money (currency).
https://plentz.github.io/jquery-maskmoney/
MIT License
963 stars 507 forks source link

Wrong Masking when value without FractionDigits with precision 2 #271

Open wiemKh opened 3 years ago

wiemKh commented 3 years ago

Hello, I am using jquery-maskmoney for adding a thousand separators for decimal I used this configuration

 $(".money").maskMoney({    
        decimal: ",",
        thousands: " ",
        precision : 2,
        allowZero : true
    });

but I want the user can insert decimal with 1 precision or 0 precision or 2 precision for example, when user want to insert 1500, he should insert 1500,00 for the mask work I don't want to oblige user typing ,00 also I use the same input for the update when it contains a value for example 1500 without,00 it transforms to 15,00 when opening modal any ideas?