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

ej-numbertextbox: Value doesn't represent what's being displayed to the user

Thread ID:

Created:

Updated:

Platform:

Replies:

122062 Feb 12,2016 11:17 AM Feb 18,2016 08:01 AM JavaScript 3
loading
Tags: General
Greg Gannicott
Asked On February 12, 2016 11:17 AM

Hello.

We're using the ej-numerictextbox control. We've implemented it using AngularJS.

We are binding to it via the ng-model directive, and the e-value directive.

Steps to Recreate

We've encountered the following problem:

We have a max value of 4000 being applied to the control (using e-maxvalue="4000").

When enter 4000 into the control.

We then enter an additional 00 and it displays as 40000 (the first 0 entered isn't displayed, the second is). This could occur if the user holds down the 0s as a shortcut to get the max value.

If we click or tab away, it reverts to display 4,000 (which is great - that's the value we want).

However, the value associated with the control is actually 4,0000. And as a result, this is what is saved to the database.

Could you fix the control please so that the value associated with the control in this instance is what's displayed to the user.

Many thanks.


Sasikala Nagarajan [Syncfusion]
Replied On February 16, 2016 12:39 PM

Hi

Thanks for contacting Syncfusion support,

We have checked with your query and we suspect that the issue may be caused due to specifying the both “ng-model” and “e-value” in NumericTextbox control. Please bind the “e-value” only in ej numeric text control, it will adds the ng-model and required options automatically, if you render the component inside the form control.

Please refer the below code example,

[html]
           
 <input id="numeric" type="text" ej-numerictextbox e-value="nvalue" e-maxvalue="4000"/>


For your convenience, we have prepared the simple sample to showcase this. Please refer the below link

http://jsplayground.syncfusion.com/rnlt3phf


Please check with given solution and let us know if you have further queries,

Regards,

Sasikala Nagarajan

Greg Gannicott
Replied On February 17, 2016 06:52 AM

Hi.

Thanks for the response.

Unfortunately, when you remove ng-model, the user is able to enter (for example) 400000000000. When the control loses focus it is reduced to 4,000, but we require that the user is unable to input more than the maximum amount at the time of input, as we feel this is a better user experience.

Is this possible?

Thanks.

Sasikala Nagarajan [Syncfusion]
Replied On February 18, 2016 08:01 AM

Hi Greg,

Thanks for the update. Currently there is no option to validate the min and max values at the time of input instead of validating the values in control focus out. Already we have logged your reported requirement  as a feature request  in our database. A support incident to track the status of this feature has been created under your account. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents


Regards,
Sasikala Nagarajan

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.

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.

;