I want to use Cleave js for currency format. My Cleave tag looks like this:
<Cleave className="input-numeral"
name="loanAmount"
options={{ numeral: true,
numeralDecimalMark: ',',
delimiter: '.'
}}
value={this.props.loanAmount}
onChange={this.props.handleChange}
/>
Suppose if the input is 82456.56
I want output something like this: 82.456,56. The code is working fine if I do not use 'value' prop in this. But I need to use value as I need the initial value from the props in formatted way.
What shall I do in this case to read the value from props initially and then to change it according to the user input?