jQuery EasyUI Form Plugin - Numberspinner Numeric Spinner
Extends from $.fn.spinner.defaults and $.fn.numberbox.defaults. Overrides the default defaults with $.fn.numberspinner.defaults.
The numeric spinner (numberspinner) is created based on the spinner and numberbox. It can convert the input value into different types (such as numeric, percentage, currency, etc.). It allows users to scroll to a desired value using the up/down spinner buttons.
Dependencies
- spinner
- numberbox
Usage
Create a numeric spinner (numberspinner) from markup.
<input id="ss" class="easyui-numberspinner" style="width:80px;"
required="required" data-options="min:10,max:100,editable:false">
Create a numeric spinner (numberspinner) using JavaScript.
<input id="ss" required="required" style="width:80px;">
$('#ss').numberspinner({
min: 10,
max: 100,
editable: false
});
Create a numeric spinner (numberspinner) and format the number as a currency string.
<input class="easyui-numberspinner" value="1234567890" style="width:150px;"
data-options="required:true,precision:2,groupSeparator:',',decimalSeparator:'.',prefix:'$'">
Properties
The properties extend from spinner and numberbox.
Events
The events extend from spinner.
Methods
The methods extend from spinner, and the following are overridden methods for the numeric spinner (numberspinner).
Name | Parameters | Description |
---|---|---|
options | none | Returns the options object. |
setValue | value | Sets the value of the numeric spinner (numberspinner). <br>Example: $('#ss').numberspinner('setValue', 8234725); // set value<br>var v = $('#ss').numberspinner('getValue'); // get value<br>alert(v) |