I have been asked for something a bit weird, that the fields
input numeric of a JSP page have 2 decimals by default.
So far everything is normal:
<input type="number" step="0.01" />
Now, the client wants the quantities to ALWAYS have 2 decimal places, even for 0:
That is, while you use the arrows to increase the quantity or loads from the database a value with zeros in the decimal places that this value is not trimmed (that is, overwrite the default behavior that ignores the zeros to the right)
I've tried it with
but it does not seem to work.