Plugins Form Numberbox
# jQuery EasyUI Form Plugin β Numberbox
* * jQuery EasyUI Plugins](#)
* * *
Extends $.fn.validatebox.defaults. Overrides defaults by $.fn.numberbox.defaults.
The numberbox is used to let the user enter only number values. It can convert the input element into different types of input (e.g., numeric, percentage, currency, etc.). More input types are defined by the 'formatter' and 'parser' functions.
!(#)
## Dependencies
* validatebox
## Usage
Create numberbox from markup.
Create numberbox using javascript.
$('#nn').numberbox({ min:0, precision:2});
## Properties
The properties extend from validatebox, following properties are added to numberbox:
| Name | Type | Description | Default Value |
| :--- | :--- | :--- | :--- |
| disabled | boolean | Defines if to disable the field. | false |
| value | number | The default value. | |
| min | number | The minimum allowed value. | null |
| max | number | The maximum allowed value. | null |
| precision | number | The maximum precision to display after the decimal point. | 0 |
| decimalSeparator | string | The separator between the integer and the decimal part of a number. | . |
| groupSeparator | string | The separator between groups of numbers. | |
| prefix | string | The prefix string. | |
| suffix | string | The suffix string. | |
| filter | function(e) | Defines how to filter the pressed key, return true to accept the input character. This property is available since version 1.3.3. | |
| formatter | function(value) | A function to format the numberbox value. Returns the string value to display in the box. | |
| parser | function(s) | A function to parse a string. Returns the numberbox value. | |
## Events
| Name | Parameters | Description |
| :--- | :--- | :--- |
| onChange | newValue,oldValue | Fires when the field value is changed. |
## Methods
The methods extend from validatebox, following methods are added or overridden to numberbox:
| Name | Parameters | Description |
| :--- | :--- | :--- |
| options | none | Returns the options object. |
| destroy | none | Destroys the numberbox object. |
| disable | none | Disables the field. |
| enable | none | Enables the field. |
| fix | none | Fixes the value to a valid value. |
| setValue |
YouTip