Controls the decimal character. Default is a period (.
).
Controls if default (initial) values are formatted on page ready (load).
Controls padding of the decimal places. true: always pads the decimal with zeros (default) false: no padding
Controls the thousand separator character. Default is comma (,
).
Displays the desired currency or unit symbol (examples: €
or EUR
). Default is undefined
.
If not set, no unit symbol is shown.
This was developed to accommodate for different keyboard layouts.
altDec
allows you to declare an alternative key to enter the
decimal separator assigned in aDec
Controls the digital grouping and the placement of the thousand separator, eg.
2
: Groups of hundreds, eg. 13,24,98
3
: Groups of thousands, eg. 132,498
(default)4
: Groups of ten-thousands, eg. 13,2498
Controls leading zeros behavior.
allow
: Allows leading zero to be entered. They are removed on focusout event (default).deny
: Leading zeros not allowed.keep
: Leading zeros allowed and will be retained on the focusout event.Overrides the decimal places that that are set via the vMin
/ vMax
settings.
Default is undefined
.
Sets the rounding method used. Available methods are:
S
: Round-Half-Up Symmetric (default)A
: Round-Half-Up Asymmetrics
: Round-Half-Down Symmetrica
: Round-Half-Down AsymmetricB
: Round-Half-Even "Bankers Rounding"U
: Round Up "Round-Away-From-Zero"D
: Round Down "Round-Toward-Zero" - same as truncateC
: Round to Ceiling "Toward Positive Infinity"F
: Round to Floor "Toward Negative Infinity"CHF
: Rounding for Swiss currency "to the nearest .00 or .05"Controls if negative values are displayed with brackets when the input does not have focus.
Default is undefined
.
Controls the placement of the currency or unit symbol (prefix or suffix).
p
: prefix to the left (default).s
: suffix to the right.Controls the maximum allowed value. Default is 9999999999999.99
.
Controls the minimum allowed value. Default is -9999999999999.99
.
Controls input display behavior.
empty
: Allows input to be empty (default)zero
: Input field will have at least a zero value.sign
: The currency symbol is always present.
Options that may be passed to autoNumeric during initialization. You can initialize autoNumeric by selecting an input element and calling the
autoNumeric
function. You can pass an options object to that function call:$("[data-name='tfMoney']").autoNumeric(options);
The available options are documented below.
Please note that instead of specifying the options via JavaScript, you can also add HTML data attributes to the input field:
<input id="money-field" data-a-dec="," data-a-sign="kg" data-v-min="1" data-v-max="100" data-m-dec="3" >