Optional
initialValue: stringThe default value to display. This also controls the amount of digits after the decimal separator. When omitted defaults to 0.00 (value 0 with two values after separator).
Optional
initializer: FormatterInitializerA Moneydew MoneyFormatter initializer. Refer to Moneydew documentation. This controls the formatting of the input. When omitted defaults to settings of default constructor for MoneyFormatter.
Private
_allowPrivate
_eventPrivate
_formatterPrivate
_inputPrivate
_inputPrivate
_invalidPrivate
_maxPrivate
_minPrivate
_moneyPrivate
_negPrivate
_negPrivate
_negPrivate
_negPrivate
_posPrivate
_posPrivate
_posPrivate
_posPrivate
_strictPrivate
_validIf set to true, values like -0 or -0.00 cannot be entered. This only has an effect on the displayed value. Note that getValue doesn't return zero values with a leading dash either way, so it's not affected by this.
Disables strict mode after enableStrictMode was called. When strict mode is disabled, the decimal separator can be deleted and so can the numbers to the right of the decimal separator. This allows for more flexibility when the user is typing but may require extra validation. Keep in my that getFormattedValue and getValue always return a valid value. Strict mode only controls the displayed value and user interaction.
Enables strict mode. In strict mode the decimal separator cannot be removed and typing with the caret touching the digits right of the decimal separator will overwrite the digit to the right of the caret. This implicitly means that the value held by the currency input is always valid. Keep in my that getFormattedValue and getValue always return a valid value. Strict mode only controls the displayed value and user interaction.
Private
fitReplaces the Moneydew formatter currently in use with a new one and automatically adjusts displayed value. It is not recommended to change this formatter afterward as the currency will not automatically register those changes.
The new formatter - refer to Moneydew documentation for details
a string representing the currently held value matching the following pattern: ^(0|[1-9]\d*)\.\d{x,x}$ where x is the amount of current decimal places. Missing decimal places are filled with zeroes. This string can be easily converted to a number but be careful as it may be larger than the largest integer.
Private
handleAllows specifying a callback function that is called after the user makes an invalid input. If a callback (for invalid input) has already been specified, the old one will be overwritten by the new one.
A parameterless function returning void
Sets the current value held by the input. This implicitly determines the amount of decimal places displayed. If the input currently has a minimum and/or maximum defined and those have a different floating point precision from value, then those limits are removed.
Unmounts the currency input. Trying to use member functions other than remount after unmounting will result in undefined behaviour until remount is called or the variable has been overwritten by a new instance of IntlCurrencyInput. Note that you don't have to call this function before remount. This function is useful if you want to stop input restrictions on the input element. It is recommended to unmount before the currency input gets destroyed by the garbage collector. Otherwise, you end up with a rogue event listener on your input element.
Allows specifying a callback function that is called after the user makes a valid input. If a callback (for valid input) has already been specified, the old one will be overwritten by the new one.
A parameterless function returning void
Generated using TypeDoc
An HTML element inside which to place the currency input