We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Custom format doesn't format integer values

Hello,

So I want to use numerictextbox format property to have specific number of symbols before and after comma/dot. If I'm using format e.g. "###.##" as in the example and you write value let's say 84894894.4864864 the output will be 84894894.48, it cuts decimals but it doesn't cut integers to 3 symbols

Demo:

1 Reply

CI Christopher Issac Sunder K Syncfusion Team June 18, 2019 12:26 PM UTC

Hello Domantas, 

Greetings from Syncfusion support. 

You want to cut-off the integer part of the NumericTextBox based on the provided format but the behavior and usage of custom format (#) is different. The # custom numeric format only formats the numbers with group separators, decimal separators and round off the decimal digits as per the number of # present after decimal separator and it will not touch the integer part. Please refer the below documentation on custom numeric format, 

The custom format for our controls have been implemented as per the MSDN standards. Please refer to the below documentation, 

If you really want to limit the numbers present in the integer part, the MaskedTextBox is the recommended one which uses mask configuration to limit the display digits. Please find the below documentation on Mask Configuration of MaskedTextBox, 

We have prepared a sample based on your requirement. Here is a code snippet, 

<ejs-maskedtextbox mask="000.000" promptChar=" "></ejs-maskedtextbox> 


Please check with the provided information and get back to us if you need any further assistance. 

Thanks, 
Christo 


Loader.
Up arrow icon