Options
Menu

Hierarchy

  • UpNumberEditControl
    • UpFloatControl

Index

Accessors

maxLength

  • get maxLength(): number
  • set maxLength(value: number): void
  • Gets the maximum length of the control.

    Returns number

  • Sets the maximum length of the control.

    Parameters

    • value: number

    Returns void

required

  • get required(): boolean
  • set required(value: boolean): void
  • Can get required status.

    Returns boolean

  • Sets required status.

    Parameters

    • value: boolean

    Returns void

Methods

checkValidity

  • checkValidity(): Promise<ValidationInfo>
  • Checks if the value matches the regex and is in range of values.

    Returns Promise<ValidationInfo>

getMaxValue

  • getMaxValue(): undefined | string
  • Gets the fields maximum value.

    Returns undefined | string

getMinValue

  • getMinValue(): undefined | string
  • Gets the fields minimum value.

    Returns undefined | string

getValue

  • getValue(): string
  • Returns the fields value.

    Returns string

isInRange

  • isInRange(input?: string): boolean
  • Checks if the value is in range of values the user gives.

    Parameters

    • Optional input: string

      The value to check

    Returns boolean

isValid

  • isValid(value?: string | number): boolean
  • Checks if the value is valid

    Parameters

    • Optional value: string | number

      The value to check

    Returns boolean

    Boolean if value is valid

setMaxValue

  • setMaxValue(value: string | number, options?: { checkValidity: boolean }): void
  • Sets the fields maximum value.

    Parameters

    • value: string | number
    • options: { checkValidity: boolean } = ...

      An object of possible options to pass

      • checkValidity: boolean

        Whether to run and report the validation (default: true)

    Returns void

setMinValue

  • setMinValue(value: string | number, options?: { checkValidity: boolean }): void
  • Sets the fields minimum value.

    Parameters

    • value: string | number
    • options: { checkValidity: boolean } = ...

      An object of possible options to pass

      • checkValidity: boolean

        Whether to run and report the validation (default: true)

    Returns void

setValue

  • setValue(input?: string | number, settings?: { triggerOnchange?: "disabled" | "strict" | "always" }): void
  • Creates a local formatted string from a number object or string and writes it as value into a HTML control.

    important

    The conversion uses the fields localization. A string must have the matching format for a propper result!

    Parameters

    • Optional input: string | number

      The local formatted string

    • Optional settings: { triggerOnchange?: "disabled" | "strict" | "always" }
      • Optional triggerOnchange?: "disabled" | "strict" | "always"

    Returns void

toLocalFormat

  • toLocalFormat(input: string | number): string
  • Converts a number or string to a local formatted string.

    Parameters

    • input: string | number

      The given input string/number to convert to the local format

    Returns string

    A string with local formatted number or NaN.