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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

The example (Maintain trailing zeros in NumericTextBox) in the documentation doesn't work

Thread ID:





141272 Dec 3,2018 03:46 PM UTC Dec 5,2018 12:18 PM UTC Angular - EJ 2 3
Tags: NumericTextBox
Paul Kocher
Asked On December 3, 2018 03:46 PM UTC


The example give on this page:


breaks the NumericTextbox. While it does show the trailing zeros when focused, clicking on the spinners will then show NaN in the textbox....

Christopher Issac Sunder K [Syncfusion]
Replied On December 4, 2018 06:37 PM UTC

Hi Paul, 
Thank you for contacting Syncfusion support. 
We have checked your reported problem at our end. We were unable to reproduce the reported problem in the mentioned documentation sample. But we were able to reproduce that problem with globalization support for NumericTextBox and our mentioned documentation code block. The reported problem occurs due to improperly formatted the NumericTextBox component value(without consider the globalization support) and set to NumericTextBox. You can resolve this problem by using below code block for both focus and change event of NumericTextBox, 
   //create the instance for NumericTextBox 
let element: any = document.getElementById('numeric'); 
let numericObj: any = element.ej2_instances[0]; 
//Initialize the Internalization 
let intl: any = new Internationalization(numericObj.locale); 
//Formatting the value 
let formattedValue: string = intl.getNumberFormat({ 
    skeleton: numericObj.format, maximumFractionDigits: numericObj.decimals, 
    minimumFractionDigits: numericObj.decimals, useGrouping: false 
//Set the value to NumericTextBox 
numericObj.element.value = formattedValue; 
We will resolve this problem in our documentation on as soon as possible.  
Please let us know, if you have any concerns on this. 

Paul Kocher
Replied On December 5, 2018 08:43 AM UTC

Hello Christo,

thanks for your response. The code you gave me works fine.

Christopher Issac Sunder K [Syncfusion]
Replied On December 5, 2018 12:18 PM UTC

Hi Paul, 

We are glad to hear that the provided code snippet resolved your issue. Please get back to us if you require any further assistance. 



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