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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Allow only integer numbers

Thread ID:

Created:

Updated:

Platform:

Replies:

148335 Oct 15,2019 10:08 PM UTC Oct 16,2019 12:58 PM UTC Blazor 1
loading
Tags: Numeric Textbox
Peter
Asked On October 15, 2019 10:08 PM UTC

Hi,

how can I setup EjsNumericTextBox so that only integer numbers are possible to enter? I've tried:

Here, when I type "10.6789", number gets displayed as "11", but when I click again on the input, value is "10.6789".
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType="true" Decimals="0" Format="n0"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals="0" Format="n0"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals=0 Format="n0"></EjsNumericTextBox>


Here, when I type "10.6789", number gets displayed as "10.679" and when I click on the input, value is "10.6789".
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType="true" Decimals="0" Format="n"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals="0" Format="n"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals=0 Format="n"></EjsNumericTextBox>



Here I tested Decimals=1 to see how it behaves. It seems that with Decimals=1, I can only type 1 decimal as expected.
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType="true" Decimals="1" Format="n0"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals="1" Format="n0"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals=1 Format="n0"></EjsNumericTextBox>

<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType="true" Decimals="1" Format="n"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals="1" Format="n"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals=1 Format="n"></EjsNumericTextBox>


So it seems that Decimals=0 is problematic, as it still allows me to type decimal point and after that as many decimals as I wish.
Am I doing something wrong?

thanks


Narayanasamy Panneer Selvam [Syncfusion]
Replied On October 16, 2019 12:58 PM UTC

Hi Peter,

Thanks for contacting us.
 
We have validated your query and were able to reproduce the reported issue. We have confirmed that the reported issue as bug at our end. The fix for this issue will be included in the upcoming patch release, which is expected to release on 17th October 2019. Further, you can track status through below feedback link, 
We appreciate your patience until then.

Regards,
Narayanasamy P.
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon