[Ext JS ]3.4 Number input box numberfield

  • Class: Ext.form.field.Number
  • xtype: numberfield
    The number input box is used to input numbers, and it can be verified that the numbers are within the valid range.

Basic usage:

{
                    xtype: 'numberfield',
                    name: 'mynumfield',
                    fieldLabel: '数字字段',

                }

The displayed effect is as follows:
insert image description here

Set the maximum and minimum values ​​of the input

                    maxValue: 99,
                    minValue: 0

set min max

  • minValue , default negative infinitesimal
  • maxValue, the default is the maximum value of JS Number.MAX_VALUE, which is close to 1.79E+308

Decimals are not allowed

 allowDecimals :false,

Up and down nudge buttons

By default, fields of numeric type have an up and down spinner button. Click the button to increase or decrease the number by 1. The number of increments and decrements per click can be adjusted by step, such as 2 increments each time

step:2

Guess you like

Origin blog.csdn.net/oscar999/article/details/124031181