4
I’m using the plugin jquery.inputmask for various types of mask in the imputs of my application and including for format coins.
I’m using the following custom rule:
<script>
$(function() {
$("#money").inputmask('decimal', {
'alias': 'decimal',
'radixPoint': ','
'groupSeparator': '.'
'autoGroup': true,
'digits': 2,
'digitsOptional': false,
'rightAlign': false
'placeholder': '0'
});
</script>
With very specific values works very well, for example: R$ 2.500,50
.
Already with rounded values, for example: R$ 2.000,00
(when recovering data from BD) the mask is changing the point by the comma and returning a value R$ 2,00
.
Someone managed to get around this problem for real coins?
More specific Details: https://github.com/RobinHerbots/Inputmask/issues/1418
– Thiago Pereira