Options
All
  • Public
  • Public/Protected
  • All
Menu

Note that ES6 modules cannot directly export class objects. This file should be imported using the CommonJS-style: import AutoNumeric = require('autonumeric');

Alternatively, if --allowSyntheticDefaultImports or --esModuleInterop is turned on, this file can also be imported as a default import: import AutoNumeric from 'autonumeric';

Refer to the TypeScript documentation at https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require to understand common workarounds for this limitation of ES6 modules.

Index

Type aliases

CaretPositionOption

CaretPositionOption: "start" | "end" | "decimalLeft" | "decimalRight" | "doNoForceCaretPosition"

CurrencySymbolPlacementOption

CurrencySymbolPlacementOption: "p" | "s"

EmptyInputBehaviorOption

EmptyInputBehaviorOption: "null" | "focus" | "press" | "always" | "min" | "max" | "zero" | number | string

LeadingZeroOption

LeadingZeroOption: "allow" | "deny" | "keep"

NegativePositiveSignPlacementOption

NegativePositiveSignPlacementOption: "p" | "s" | "l" | "r" | null

OnInvalidPasteOption

OnInvalidPasteOption: "error" | "ignore" | "clamp" | "truncate" | "replace"

OutputFormatOption

OutputFormatOption: "string" | "number" | "." | "-." | "," | "-," | ".-" | ",-" | null

OverrideMinMaxLimitsOption

OverrideMinMaxLimitsOption: "ceiling" | "floor" | "ignore" | null

PredefinedOptions

PredefinedOptions: Partial<Options> & PredefinedLanguages

RoundingMethodOption

RoundingMethodOption: "S" | "A" | "s" | "a" | "B" | "U" | "D" | "C" | "F" | "N05" | "CHF" | "U05" | "D05"

SerializeSpacesOption

SerializeSpacesOption: "+" | "%20"

Methods

Static areSettingsValid

  • areSettingsValid(options: Options): boolean
  • Return true in the settings are valid

    Parameters

    Returns boolean

Static format

  • Format the given number with the given options. This returns the formatted value as a string.

    Parameters

    Returns string

Static formatAndSet

  • Format the domElement value with the given options and returns the formatted value as a string.

    Parameters

    Returns string

Static getAutoNumericElement

  • Return the AutoNumeric object that manages the given DOM element

    Parameters

    Returns export=

Static getDefaultConfig

  • Return the default autoNumeric settings

    Returns Options

Static getPredefinedOptions

Static isManagedByAutoNumeric

  • isManagedByAutoNumeric(domElement: HTMLElement): boolean
  • Return true if the given DOM element has an AutoNumeric object that manages it.

    Parameters

    Returns boolean

Static localize

  • Unformat and localize the given formatted string with the given options.

    Parameters

    Returns string

Static localizeAndSet

Static mergeOptions

Static multiple

  • multiple(elementsOrSelector: string | HTMLElement[] | { exclude?: undefined | HTMLInputElement[]; rootElement: HTMLElement }, initialValue?: null | number | (null | number)[], options?: null | Options | Options[]): export=[]
  • Parameters

    • elementsOrSelector: string | HTMLElement[] | { exclude?: undefined | HTMLInputElement[]; rootElement: HTMLElement }
    • Optional initialValue: null | number | (null | number)[]
    • Optional options: null | Options | Options[]

    Returns export=[]

Static reformatAndSet

  • reformatAndSet(referenceToTheDomElement: HTMLElement): void
  • Parameters

    Returns void

Static test

Static validate

  • validate(options: Options): boolean
  • Parameters

    Returns boolean

Static version

  • version(): string
  • Returns string

Generated using TypeDoc