$('#currency').inputmask("numeric", {
radixPoint: ".",
groupSeparator: ",",
digits: 2,
autoGroup: true,
prefix: '$ ', //Space after $, this will not truncate the first character.
rightAlign: false,
oncleared: function() {
self.Value('');
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input type="text" class="form-control" id="currency" name="currency">
<script type='text/javascript' src="https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/dist/jquery.inputmask.bundle.js"></script>
input = 15097040
output = $ 15,097,040
It should be like this: $150,970.40
. Can anyone help how to get the format right?