formcycle 8.4.0 - JavaScript for forms
    Preparing search index...

    Interface NumberFormatApiDo

    The API for performing actions on NumberFormat elements, such as changing the value or the options.

    The API is available via $.xutil.numberFormat.do.

    interface NumberFormatApiDo {
        changeOptions: (
            reference: any,
            options: Partial<NumberFormatOptions>,
        ) => void;
        setValue: (reference: any, newValue: string | number) => void;
    }
    Index

    Properties

    changeOptions: (reference: any, options: Partial<NumberFormatOptions>) => void

    Updates the options of all given NumberFormat elements.

    Type declaration

      • (reference: any, options: Partial<NumberFormatOptions>): void
      • Parameters

        • reference: any

          NumberFormat elements to update.

        • options: Partial<NumberFormatOptions>

          The options to update.

        Returns void

    If any element does not have an NumberFormat instance.

    setValue: (reference: any, newValue: string | number) => void

    Sets the value of all given NumberFormat elements to the given value. The value may be a number (1234.56) or a numerical string ("1234.56"), but not a formatted string (1234·56).

    Type declaration

      • (reference: any, newValue: string | number): void
      • Parameters

        • reference: any

          The elements to set the value for.

        • newValue: string | number

          The value to set. Use an empty string or undefined to clear the value.

        Returns void

    If any element does not have an NumberFormat instance.