Number
KIT

Use maskitoNumberOptionsGenerator to create a mask for entering a formatted number.
Despite the name of the mask, element's raw value is still string.

Use maskitoParseNumber to get number-type value.

    
    

High precision

Use precision parameter to configure the number of digits after decimal separator.

    
    
    
    
    
    
    
    
    
    

Separators

Use decimalSeparator and thousandSeparator to get mask with locale specific representation of numbers.

In Germany people use comma as decimal separator and dot for thousands
    
    
    
    
    
    
    
    
    
    

Postfix

Use postfix parameter to set non-removable text after the number.
Additionally you can use maskitoCaretGuard to clamp caret inside allowable range.
This example also shows how to restrict the greatest permitted value via max parameter.

    
    
    
    
    
    
    
    
    
    

Decimal zero padding

Set decimalZeroPadding: true to always show trailing zeroes.

Non removable dollar sign is achieved by using prefix parameter.

    
    
    
    
    
    
    
    
    
    

Minus sign

Use minusSign parameter to configure the character which indicates that a number is negative.

In this example hyphen is used as minusSign

    
    
    
    
    
    
    
    
    
    

Dynamic decimal zero padding

You can change options on the fly to build complex logic.
This example shows how to initially disable decimalZeroPadding and enable it only after user inserts decimal separator.