Hi Wapplers,
I am trying to get an input field to be formatted as currency - i.e $1,000.00
I have set a dynamic attribute to the field, and set value as follows:
value.toNumber().formatCurrency(’$’, ‘.’, ‘,’, 2)
However this is not working and every time I try and type in the input it wont let me. It keeps deleting the first letter I type.
Any idea what I am doing wrong?
Markup is as follows:
<div class="form-group md-3"> <label for="dealhighlight" class="form-label">Loan Amount</label>
<input class="form-control" id="dealhighlight" name="dealHighlight" aria-describedby="input2_help" value="$1,000.00" placeholder="$1,000.00" dmx-bind:value="value.toNumber().formatCurrency('$', '.', ',', 2)" type="number">
<small id="input2_help" class="form-text">Your input is very valuable.</small>
</div>
Community Page
Last updated:
Last updated: