mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-01 20:34:20 +01:00
3f789cfdce
Also fix some failed tests and adjust widget sizing
1.4 KiB
1.4 KiB
Examples
Spinners
To add up / down arrow buttons to change the value, set step
.
<et2-number label="0.5 step" step="0.5"></et2-number>
Precision
To enforce a certain number of decimal places, set precision
.
<et2-number label="Two decimal places" precision="2" value="123.456"></et2-number>
<et2-number label="Integers only" precision="0" value="123.456"></et2-number>
Number Format
Normally numbers use the user's number format for thousands and decimal separator from preferences, but it is possible to specify for a particular number. The internal value is not affected.
<et2-number decimalSeparator="p" thousandsSeparator=" " value="1234.56"></et2-number>
Minimum and Maximum
Limit the value with min
and max
<et2-number min="0" label="Greater than 0"></et2-number>
<et2-number min="10" max="20" label="Between 10 and 20"></et2-number>
Prefix & Suffix
Use prefix
and suffix
attributes to add text before or after the input field. To include HTML or other widgets, use
the prefix
and suffix
slots instead.
<et2-number prefix="$" value="15.46"></et2-number>
Currency
Using suffix
,min
and precision
together
<et2-number suffix="€" min="5.67" precision="2" label="Price"></et2-number>