InputNumeric
Input numeric Props
Default value
The current number box value.
Type: Number
Default Value: 0
disabled
Specifies whether the UI component responds to user interaction.
Type: Boolean
Default Value: false
format
Specifies the value's display format and controls user input accordingly
Custom format string
Use Unicode Locale Data Markup Language (LDML) patterns to specify a custom format string. An LDML pattern consists of wildcard characters and characters displayed as is. The format property supports the following wildcard characters:
Format character | Description |
---|---|
0 | A digit. Displays '0' if the formatted number does not have a digit in that position. |
# | Up to 15 of leading digits, a single digit, or nothing. If this character goes first in the format string, it can match multiple leading digits (before the decimal point). Subsequent characters match a single digit. If the formatted number does not have a digit in the corresponding position, it displays nothing. For example, if you apply format "#0.#" to "123.45", the result is "123.4". |
. | A decimal separator. Actual character depends on locale. |
, | A group separator. Actual character depends on locale. |
% | The percent sign. Multiplies the input value by 100. |
; | Separates positive and negative format patterns. For example, the "#0.##;(#0.##)" format displays a positive number according to the pattern before the semicolon (";"), and a negative number according to the pattern after the semicolon (";"). If you do not use this character and the additional pattern, negative numbers display a minus ("-") prefix. |
Escape characters | You can display the special characters above as literals if you enclose them in single quotation marks. For example, '%'. |
Other characters | You can add any literal characters to the beginning or end of the format string. |
The examples below demonstrate the behavior of "#" and "0" in fractional numbers:
The examples below show different ways to apply percentage formatting to decimals. Use caution if your format string starts with a zero ('0'), because the formatted number may lose leading digits.
precision
Specifies a precision for values of numeric or currency format types.
Type: Number
label
Specifies a text string used to annotate the editor's value.
Type: String
Default Value: 'Input Numeric'
max
The maximum value accepted by the number box.
Type: Number
Default Value: undefined
min
The minimum value accepted by the number box.
Type: Number
Default Value: undefined
step
Specifies how much the UI component's value changes when using the spin buttons, Up/Down arrow keys, or mouse wheel.
Type: Number
Default Value: 1
Last updated