Currently the default numeral formatter only supports decimals to two digits beyond the decimal point. I think this could be improved on by raising the limit to perhaps 5 or 6. This seems to me a more reasonable default value for decimal places.
This default could be changed in line 364 of cleave.js (within the definition of DefaultProperties):
target.numeralDecimalScale = opts.numeralDecimalScale || 2;
to
target.numeralDecimalScale = opts.numeralDecimalScale || 6;
The numeral mode is mainly designed for inputting currency/money value, so will keep it as 2.
Thanks for proposing.
It's not wise to reject that propose. When implementing crypto currency, sometimes we need to provide more than 2 decimal digits number (e.x. a mount of Bitcoin to sell/buy). It's appreciated if you guys can fix this.
@athongintel I understand the requirement to have more than 2 digits decimal number, but why would it be a problem for you to pass numeralDecimalScale as an option? like this https://github.com/nosir/cleave.js/blob/master/doc/options.md#numeraldecimalscale
Yes, I found it later on. Thank you very much.
Most helpful comment
It's not wise to reject that propose. When implementing crypto currency, sometimes we need to provide more than 2 decimal digits number (e.x. a mount of Bitcoin to sell/buy). It's appreciated if you guys can fix this.