Formatting the value

User can set the format of the NumericTextBox component using format
property. The value will be displayed in the specified format, when the component is in focused out state. For more information about
formatting the value, refer to this link.

The below example demonstrates format the value by using currency format value c2.

Precision of numbers

You can restrict the number of decimals to be entered in the NumericTextBox by using the decimals
and validateDecimalOnType properties.
So, you can’t enter the number whose precision is greater than the mentioned decimals.

If validateDecimalOnType is false, number of decimals will not be restricted.
Else, number of decimals will be restricted while typing in the NumericTextBox.

Source

Preview

app.ts

index.html

styles.css

import{NumericTextBox}from'@syncfusion/ej2-inputs';let numeric: NumericTextBox =newNumericTextBox({// restricts number of decimals to be entered in the NumericTextBox
validateDecimalOnType:true,// sets number of decimal places to be allowed by the NumericTextBox
decimals:3,// sets number with 3 numbers of decimal places format
format:'n3',
value:10,
placeholder:'ValidateDecimalOnType enabled',
floatLabelType:'Auto'});
numeric.appendTo('#strict');let numeric: NumericTextBox =newNumericTextBox({// sets number of decimal places to be allowed by the NumericTextBox
decimals:3,// sets number with 3 numbers of decimal places format
format:'n3',
value:10,
placeholder:'ValidateDecimalOnType disabled',
floatLabelType:'Auto'});
numeric.appendTo('#allow');