InputNumber
The InputNumber control allows users to enter and edit numbers. It has the following advantages over regular input elements:
- Users cannot enter non-numeric values at all.
- You can use the format property to format the number as it is edited, making it easy to read.
- You can use the min and max properties to specify the valid range of values (users will not be able to enter values outside this range).
- You can use the step property to specify an increment that is added to the value when the user clicks the increment/decrement buttons on the control.
For example, here is an InputNumber with default settings:
The current value is 0.
By default, InputNumber values are required, so you can't delete the entire content of the control. If you want to enter a number that is optional, set the isRequired property to false: