Returns the unformatted value, but following the outputFormat setting, which means the output can either be:
a string (that could or could not represent a number, ie. "12345,67-"), or
a plain number (if the setting 'number' is used).
By default the returned values are an ISO numeric string "1234.56" or "-1234.56" where the decimal character is a period.
Check the outputFormat option definition for more details.
Remove the autoNumeric data and event listeners from the element, but keep the element content intact.
This also clears the value from sessionStorage (or cookie, depending on browser supports).
Note: this does not remove the formatting.
Set the given element value, and format it immediately.
Additionally, this set() method can accept options that will be merged into the current AutoNumeric element, taking precedence over any previous settings.
example
anElement.set('12345.67') // Formats the value
example
anElement.set(12345.67) // Formats the value
example
anElement.set(12345.67, { decimalCharacter : ',' }) // Update the settings and formats the value in one go
example
anElement.northAmerican().set('$12,345.67') // Set an already formatted value (this does not exactly respect the currency symbol/negative placements, but only remove all non-numbers characters, according to the ones given in the settings)
example
anElement.set(null) // Set the rawValue and element value to null
throws
Parameters
newValue: null | string | number
The value must be a Number, a numeric string or null (if emptyInputBehavior is set to 'null')
Set the given value directly as the DOM element value, without formatting it beforehand.
You can also set the value and update the setting in one go (the value will again not be formatted immediately).
Remove the autoNumeric data and event listeners from the element, and reset its value to the empty string ''.
This also clears the value from sessionStorage (or cookie, depending on browser supports).
Return the current formatted value of the AutoNumeric element as a string.