jqwidgets-framework
Version:
jQWidgets is an advanced Angular, Vue, Blazor, React, Web Components, jquery, ASP .NET MVC, Custom Elements and HTML5 UI framework.
983 lines (978 loc) • 65.2 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="../../../../Styles/jqx.apireference.css" type="text/css" />
<script type="text/javascript" src="../../../../scripts/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="../../../../scripts/documentation.js"></script>
<meta name="keywords" content="jQuery, Input, Number Input, Currency Input, Percentage Input, Floating-Point Input, Decimal Input, jqxNumberInput" />
<meta name="description" content="This page represents the help documentation of the jqxNumberInput widget." />
<title>jqxNumberInput API Reference</title>
<script type="text/javascript">
$(document).ready(function () {
$(".documentation-option-type-click").click(function (event) {
$(event.target).parents('tr').next().find(".property-content").toggle();
});
});
</script>
</head>
<body>
<div id="properties">
<h2 class="documentation-top-header">Properties</h2>
<table class="documentation-table">
<tr>
<th>Name
</th>
<th>Type
</th>
<th>Default
</th>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span31'>allowNull</span>
</td>
<td>
<span>Boolean</span>
</td>
<td>true
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Determines whether the widget's value could be null.
</p>
<h4>Code example</h4>
<p>
Set the <code>allowNull</code> property.
</p>
<pre><code>$('#jqxNumberInput').jqxNumberInput({allowNull: false});</code></pre>
<p>
Get the <code>allowNull</code> property.
</p>
<pre><code>var allowNull = $('#jqxNumberInput').jqxNumberInput('allowNull');</code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/au135551/">allowNull is set to false</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span1'>decimal</span>
</td>
<td>
<span>Number</span>
</td>
<td>0
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the input's number.
</p>
<h4>Code examples</h4>
<p>
Set the <code>decimal</code> property.
</p>
<pre><code>$("#jqxNumberInput").jqxNumberInput({ decimal: 5 }) </code></pre>
<p>
Get the <code>decimal</code> property.
</p>
<pre><code>var decimal = $('#jqxNumberInput').jqxNumberInput('decimal');</code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/zRBeY/">decimal is set to 2</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span6'>disabled</span>
</td>
<td>
<span>Boolean</span>
</td>
<td>false
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Determines whether jqxNumberInput is disabled.
</p>
<h4>Code examples</h4>
<p>
Set the <code>disabled</code> property.
</p>
<pre><code>$("#jqxNumberInput").jqxNumberInput({ disabled: true }) </code></pre>
<p>
Get the <code>disabled</code> property.
</p>
<pre><code>var disabled = $('#jqxNumberInput').jqxNumberInput('disabled');</code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/vSYL7/">disabled is set to true</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span10'>decimalDigits</span>
</td>
<td>
<span>Number</span>
</td>
<td>2
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Indicates the number of decimal places to use in numeric values.
</p>
<h4>Code examples</h4>
<p>
Set the <code>decimalDigits</code> property.
</p>
<pre>$("#jqxNumberInput").jqxNumberInput({ decimalDigits: 3 })<code></code></pre>
<p>
Get the <code>decimalDigits</code> property.
</p>
<pre><code>var decimalDigits = $('#jqxNumberInput').jqxNumberInput('decimalDigits'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/vXnUr/">decimalDigits is set to 3</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span11'>decimalSeparator</span>
</td>
<td>
<span>Char</span>
</td>
<td>'.'
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the char to use as the decimal separator in numeric values.
</p>
<h4>Code examples</h4>
<p>
Set the <code>decimalSeparator</code> property.
</p>
<pre>$("#jqxNumberInput").jqxNumberInput({ decimalSeparator: "," })<code></code></pre>
<p>
Get the <code>decimalSeparator</code> property.
</p>
<pre><code>var decimalSeparator = $('#jqxNumberInput').jqxNumberInput('decimalSeparator'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/eCnzK/">decimalSeparator is set to ','</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span16'>digits</span>
</td>
<td>
<span>Number</span>
</td>
<td>8
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the digits in the input
</p>
<h4>Code examples</h4>
<p>
Set the <code>digits</code> property.
</p>
<pre>$("#jqxNumberInput").jqxNumberInput({ digits: 8})<code></code></pre>
<p>
Get the <code>digits</code> property.
</p>
<pre><code>var digits = $('#jqxNumberInput').jqxNumberInput('digits'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/Ljcn2/">digits is set to 5</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span12'>groupSeparator</span>
</td>
<td>
<span>Char</span>
</td>
<td>','
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the string that separates groups of digits to the left of the decimal
in numeric values.
</p>
<h4>Code examples</h4>
<p>
Set the <code>groupSeparator</code> property.
</p>
<pre>$("#jqxNumberInput").jqxNumberInput({ groupSeparator: "." })<code></code></pre>
<p>
Get the <code>groupSeparator</code> property.
</p>
<pre><code>var groupSeparator = $('#jqxNumberInput').jqxNumberInput('groupSeparator'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/pRPDU/">groupSeparator is set to '.'</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span13'>groupSize</span>
</td>
<td>
<span>Number</span>
</td>
<td>3
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the number of digits in each group to the left of the decimal in numeric
values.
</p>
<h4>Code examples</h4>
<p>
Set the <code>groupSize</code> property.
</p>
<pre>$("#jqxNumberInput").jqxNumberInput({ groupSize: 5 })<code></code></pre>
<p>
Get the <code>groupSize</code> property.
</p>
<pre><code>var groupSize = $('#jqxNumberInput').jqxNumberInput('groupSize'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/Mv3L7/">groupSize is set to 2</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span5'>height</span>
</td>
<td>
<span>Number/String</span>
</td>
<td>null
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the height of the input in pixels.
</p>
<h4>Code examples</h4>
<p>
Set the <code>height</code> property.
</p>
<pre><code>$("#jqxNumberInput").jqxNumberInput({ height: '50px' }) </code></pre>
<p>
Get the <code>height</code> property.
</p>
<pre><code>var height = $('#jqxNumberInput').jqxNumberInput('height');</code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/SzVkL/">height is set to '25px'</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span28'>inputMode</span>
</td>
<td>
<span>String</span>
</td>
<td>'advanced'
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the input's mode.
</p>
<b>Possible Values:</b>
<br />
<pre><code>'advanced'- the number input behavior resembles a masked input with numeric mask</code></pre>
<pre><code>'simple'-the widget works as a normal textbox, but restricts the user's input to numbers</code></pre>
<h4>Code examples</h4>
<p>
Set the <code>inputMode</code> property.
</p>
<pre><code>$("#jqxNumberInput").jqxNumberInput({ inputMode: 'simple' });</code></pre>
<p>
Get the <code>inputMode</code> property.
</p>
<pre><code>var inputMode = $('#jqxNumberInput').jqxNumberInput('inputMode'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/GtGWM/">inputMode is set to 'simple'</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span2'>min</span>
</td>
<td>
<span>Number</span>
</td>
<td>-99999999
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the input's minimum value.
</p>
<h4>Code examples</h4>
<p>
Set the <code>min</code> property.
</p>
<pre><code>$("#jqxNumberInput").jqxNumberInput({ min: 5 }) </code></pre>
<p>
Get the <code>min</code> property.
</p>
<pre><code>var min = $('#jqxNumberInput').jqxNumberInput('min');</code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/SasJs/">min is set to 2</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span3'>max</span>
</td>
<td>
<span>Number</span>
</td>
<td>99999999
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the input's maximum value.
</p>
<h4>Code examples</h4>
<p>
Set the <code>max</code> property.
</p>
<pre><code>$("#jqxNumberInput").jqxNumberInput({ max: 50 }) </code></pre>
<p>
Get the <code>max</code> property.
</p>
<pre><code>var max = $('#jqxNumberInput').jqxNumberInput('max');</code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/gvEPF/">max is set to 50</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span18'>negativeSymbol</span>
</td>
<td>
<span>String</span>
</td>
<td>'-'
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the string to use as negative symbol.
</p>
<h4>Code examples</h4>
<p>
Set the <code>negativeSymbol</code> property.
</p>
<pre>$("#jqxNumberInput").jqxNumberInput({ negativeSymbol: '-'})<code></code></pre>
<p>
Get the <code>negativeSymbol</code> property.
</p>
<pre><code>var negativeSymbol = $('#jqxNumberInput').jqxNumberInput('negativeSymbol'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/KgYYq/">symbolPosition is set to '-'</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span33'>placeHolder</span>
</td>
<td>
<span>String</span>
</td>
<td>""
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Determines the widget's place holder displayed when the widget's value is null.
</p>
<h4>Code example</h4>
<p>
Set the <code>placeHolder</code> property.
</p>
<pre><code>$('#jqxNumberInput').jqxNumberInput({placeHolder: "Null Value"});</code></pre>
<p>
Get the <code>placeHolder</code> property.
</p>
<pre><code>var placeHolder = $('#jqxNumberInput').jqxNumberInput('placeHolder');</code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/zt5xLv6u/">placeHolder is set to "Null Value"</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span9'>promptChar</span>
</td>
<td>
<span>Char</span>
</td>
<td>-
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the prompt char displayed when an editable char is empty.
</p>
<b>Possible Values:</b>
<br />
<pre><code>'_'</code></pre>
<pre><code>'?'</code></pre>
<pre><code>';'</code></pre>
<pre><code>'#'</code></pre>
<h4>Code examples</h4>
<p>
Set the <code>promptChar</code> property.
</p>
<pre>$("#jqxNumberInput").jqxNumberInput({ promptChar: "#" })<code></code></pre>
<p>
Get the <code>promptChar</code> property.
</p>
<pre><code>var promptChar = $('#jqxNumberInput').jqxNumberInput('promptChar'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/hnyr6/">promptChar is set to '#'</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span51'>rtl</span>
</td>
<td>
<span>Boolean</span>
</td>
<td>false
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts.</p>
<h4>Code example</h4>
<p>
Set the <code>rtl</code> property.
</p>
<pre><code>$('#jqxNumberInput').jqxNumberInput({rtl : true}); </code></pre>
<p>
Get the <code>rtl</code> property.
</p>
<pre><code>var rtl = $('#jqxNumberInput').jqxNumberInput('rtl'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/36bY3/">rtl is set to true</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span8'>readOnly</span>
</td>
<td>
<span>Boolean</span>
</td>
<td>false
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the readOnly state of the input.
</p>
<h4>Code examples</h4>
<p>
Set the <code>readOnly</code> property.
</p>
<pre>$("#jqxNumberInput").jqxNumberInput({ readOnly: true })<code></code></pre>
<p>
Get the <code>readOnly</code> property.
</p>
<pre><code>var readOnly = $('#jqxNumberInput').jqxNumberInput('readOnly'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/mw5yj/">readOnly is set to true</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span22'>spinMode</span>
</td>
<td>
<span>String</span>
</td>
<td>'advanced'
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the spin mode.
</p>
<b>Possible Values:</b>
<br />
<pre><code>'advanced'- the value is increased depending on the caret's position</code></pre>
<pre><code>'simple'-pecifies that the spin behavior is disabled</code></pre>
<h4>Code examples</h4>
<p>
Set the <code>spinMode</code> property.
</p>
<pre><code>$("#jqxNumberInput").jqxNumberInput({ spinMode: 'simple' });</code></pre>
<p>
Get the <code>spinMode</code> property.
</p>
<pre><code>var spinMode = $('#jqxNumberInput').jqxNumberInput('spinMode'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/4UpZG/">spinMode is set to 'simple'</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span7'>spinButtons</span>
</td>
<td>
<span>Boolean</span>
</td>
<td>false
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Shows or hides the spin buttons.
</p>
<h4>Code examples</h4>
<p>
Set the <code>spinButtons</code> property.
</p>
<pre><code>$("#jqxNumberInput").jqxNumberInput({ spinButtons: true });</code></pre>
<p>
Get the <code>spinButtons</code> property.
</p>
<pre><code>var spinButtons = $('#jqxNumberInput').jqxNumberInput('spinButtons'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/M5mbm/">spinButtons is set to true</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span20'>spinButtonsWidth</span>
</td>
<td>
<span>Number</span>
</td>
<td>18
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the width of the spin buttons.
</p>
<h4>Code examples</h4>
<p>
Set the <code>spinButtonsWidth</code> property.
</p>
<pre><code>$("#jqxNumberInput").jqxNumberInput({ spinButtonsWidth: 20 });</code></pre>
<p>
Get the <code>spinButtonsWidth</code> property.
</p>
<pre><code>var spinButtonsWidth = $('#jqxNumberInput').jqxNumberInput('spinButtonsWidth'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/skfMP/">spinButtonsWidth is set to 30</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span21'>spinButtonsStep</span>
</td>
<td>
<span>Number</span>
</td>
<td>1
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the increase/decrease step.
</p>
<h4>Code examples</h4>
<p>
Set the <code>spinButtonsStep</code> property.
</p>
<pre><code>$("#jqxNumberInput").jqxNumberInput({ spinButtonsStep: 1 });</code></pre>
<p>
Get the <code>spinButtonsStep</code> property.
</p>
<pre><code>var spinButtonsStep = $('#jqxNumberInput').jqxNumberInput('spinButtonsStep'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/ah5t6/">spinButtonsStep is set to 10</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span14'>symbol</span>
</td>
<td>
<span>String</span>
</td>
<td>''
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the string to use as currency or percentage symbol.
</p>
<h4>Code examples</h4>
<p>
Set the <code>symbol</code> property.
</p>
<pre>$("#jqxNumberInput").jqxNumberInput({ symbol: '$' })<code></code></pre>
<p>
Get the <code>symbol</code> property.
</p>
<pre><code>var symbol = $('#jqxNumberInput').jqxNumberInput('symbol'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/xqKEb/">symbol is set to '$'</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span15'>symbolPosition</span>
</td>
<td>
<span>String</span>
</td>
<td>'left'
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the position of the symbol in the input.
</p>
<b>Possible Values:</b>
<br />
<pre><code>'left'</code></pre>
<pre><code></code>'right'</pre>
<h4>Code examples</h4>
<p>
Set the <code>symbolPosition</code> property.
</p>
<pre>$("#jqxNumberInput").jqxNumberInput({ symbolPosition: 'right'})<code></code></pre>
<p>
Get the <code>symbolPosition</code> property.
</p>
<pre><code>var symbolPosition = $('#jqxNumberInput').jqxNumberInput('symbolPosition'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/v94Tq/">symbolPosition is set to 'right'</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span17'>textAlign</span>
</td>
<td>
<span>String</span>
</td>
<td>'right'
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the alignment.
</p>
<h4>Code examples</h4>
<p>
Set the <code>textAlign</code> property.
</p>
<pre><code>$("#jqxNumberInput").jqxNumberInput({ textAlign: "left" });</code></pre>
<p>
Get the <code>textAlign</code> property.
</p>
<pre><code>var textAlign = $('#jqxNumberInput').jqxNumberInput('textAlign'); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/n7ca3/">textAlign is set to 'left'</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span86'>template</span>
</td>
<td>
<span>String</span>
</td>
<td>'default'
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Determines the template as an alternative of the default styles.
</p>
<b>Possible Values:</b>
<br />
<pre><code>'default' - the default template. The style depends only on the "theme" property value.</code></pre>
<pre><code>'primary' - dark blue style for extra visual weight.</code></pre>
<pre><code>'success' - green style for successful or positive action.</code></pre>
<pre><code>'warning' - orange style which indicates caution.</code></pre>
<pre><code>'danger' - red style which indicates a dangerous or negative action.</code></pre>
<pre><code>'info' - blue button, not tied to a semantic action or use.</code></pre>
<h4>Code examples</h4>
<p>
Set the <code>template</code> property.
</p>
<pre><code>$("#jqxNumberInput").jqxNumberInput({ template: 'primary'});</code></pre>
<p>
Get the <code>template</code> property.
</p>
<pre><code>var template = $('#jqxNumberInput').jqxNumberInput('template');</code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/n829fhfp/">template is set to 'success'</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span63'>theme</span>
</td>
<td>
<span>String</span>
</td>
<td>''
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets the widget's theme.
</p>
jQWidgets uses a pair of css files - jqx.base.css and jqx.[theme name].css. The base stylesheet creates the styles related to the widget's layout like margin, padding, border-width, position. The second css file applies the widget's colors and backgrounds. The jqx.base.css should be included before the second CSS file.
In order to set a theme, you need to do the following:
<ul>
<li>Include the theme's CSS file after jqx.base.css.<br />
The following code example adds the 'energyblue' theme.
<pre><code>
<pre><code><link rel="stylesheet" href="../../../../jqwidgets/styles/jqx.base.css" type="text/css" />
<link rel="stylesheet" href="../../../../jqwidgets/styles/jqx.energyblue.css" type="text/css" />
</code></pre>
</code></pre>
</li>
<li>Set the widget's theme property to 'energyblue' when you initialize it.
</li>
</ul>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/KYpGE/">theme is set to 'energyblue'</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span4'>width</span>
</td>
<td>
<span>Number/String</span>
</td>
<td>null
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
Sets or gets the width of the input in pixels. Only positive values have effect.
</p>
<h4>Code examples</h4>
<p>
Set the <code>width</code> property.
</p>
<pre><code>$("#jqxNumberInput").jqxNumberInput({ width: '250px' }) </code></pre>
<p>
Get the <code>width</code> property.
</p>
<pre><code>var width = $('#jqxNumberInput').jqxNumberInput('width');</code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/KSk9W/">width is set to '250px'</a>
</div>
</div>
</td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<h2 class="documentation-top-header">Events</h2>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span29'>change</span>
</td>
<td>
<span>Event</span>
</td>
<td></td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
This event is triggered when the value is changed and the control's focus is lost.
</p>
<h4>Code examples</h4>
<p>
Bind to the <code>change</code> event by type: jqxNumberInput.
</p>
<pre><code>$('#jqxNumberInput').on('change', function (event)
{
var value = event.args.value;
var type = event.args.type; // keyboard, mouse or null depending on how the value was changed.
}); </code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/JLL4T/">Bind to the change event by type: jqxNumberInput.</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span19'>textchanged</span>
</td>
<td>
<span>Event</span>
</td>
<td></td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
This event is triggered when the user entered entered a text.
</p>
<h4>Code examples</h4>
<p>
Bind to the <code>textchanged</code> event by type: jqxNumberInput.
</p>
<pre><code>$('#jqxNumberInput').on('textchanged', function (event)
{
var text = event.args.text;
});
</code></pre>
<div style="padding-bottom: 5px;">
<em>Try it:</em> <a target="_blank" href="http://jsfiddle.net/jqwidgets/66qLc/">Bind to the textchanged event by type: jqxNumberInput.</a>
</div>
</div>
</td>
</tr>
<tr>
<td class="documentation-option-type-click">
<span id='Span27'>valueChanged</span>
</td>
<td>
<span>Event</span>
</td>
<td></td>
</tr>
<tr>
<td colspan='3' style='width: 100%'>
<div class="documentation-option-description property-content" style="display: none;">
<p>
This event is triggered after value is changed.
</p>
<h4>Code examples