I need to create a format in AutoNumeric javascript that does the following:
If the textbox's input value is 87
, leave it unformatted: 87
If the input value is 87.6
, show it as: 87.60
If the input value is 87.65
, show it as: 87.65
If the input value is 87.654
, show it as: 87.654
If the input value is 87.6543
, round it down or truncate it: 87.654
If the input value is 87.65432
, again, round it or truncate it to 87.654
I have it all worked out except for the situation where the input value is 87.6
. The formatted value remains 87.6
, but I want it to be 87.60
, because it's a currency that can have 2 or more decimal places, but never just 1.