Skip to content

Adding a mask for an integer with two decimals #149

@svetlanapuro

Description

@svetlanapuro

Hi there,

I'm using withMask with the following options:

    useEffect(() => {
      if (inputRef.current) {
        maskRef.current = withMask("integer", {
          groupSeparator: " ",
          radixPoint: ".",
          digits: 2,
          allowMinus: false,
          rightAlign: false,
          showMaskOnHover: false,
          showMaskOnFocus: true,
          tabThrough: true,
        })(inputRef.current);
      }
    }, []);

Is it possible to add an actual mask to the input? The mask should be 0.00, where you can navigate to decimals by using arrows on the keyboard. Now I have only formatting in the input and no mask.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions