This is a migrated thread and some comments may be shown as answers.

RestrictDecimals Option Not working.

3 Answers 278 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 11 Oct 2016, 05:52 PM

We are currently using the Kendo NumericTextBox (version Kendo.2016.2.504.545) for a currency field, and we would like to restrict user entry of decimal places to 2 in the textbox. We tried a few of the NumericTextBox options, including using “RestrictDecimals” with no success.  The option RestrictDecimals ("Specifies whether the decimals length should be restricted during typing.") sounds like what we need to support this functionality, but does not look like is supported in the release we are using. We did find a forum post dated 2014 (http://www.telerik.com/forums/restrict-user-from-entering-unlimited-number-of-decimals) stating that the decimal places cannot be restricted while typing in the textbox, and overall user input can only be restricted with the min/max options

1. Is the RestrictDecimals option supported in the 2016.2.504.545 version.

2. If yes do you have sample or demo of using this option.

.  

steven

3 Answers, 1 is accepted

Sort by
0
Orlin
Telerik team
answered on 12 Oct 2016, 11:25 AM
Extension settings

Hello Steven,

The functionality you require is available in version 2016.2.504. Take a look at this dojo for a demonstration: http://dojo.telerik.com/uZeHa

If you need further assistance, please send us a code snippet or a working dojo so we can recreate the problem.

 

Regards,
Orlin
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Steven
Top achievements
Rank 1
answered on 12 Oct 2016, 04:07 PM

Thanks for the info and link to a demonstration. I ran the demo and saw that the data entry is restricted by the defined decimals.  My question now is that the demo is using 2016.3.914 for the Kendo javascript(src="http://kendo.cdn.telerik.com/2016.3.914/js/kendo.all.min.js"></script>) and not 2016.2.504.  I switched it to 2016.2.504 and ran the demo and the restrictDecimals option did not work.  I gather that we will need to upgrade our Kendo version in order to get the restrict decimals functionality.

steven

0
Orlin
Telerik team
answered on 13 Oct 2016, 06:27 AM
Extension settingsExtension settings

Yes, you are correct, Steven. This functionality does not exist prior to the latest version (2016.3.914). The new feature is also in the latest release notes: "Restrict typed decimal digits".

It seems when I changed the Kendo version in the dojo I only did it for the CSS and somehow overlooked the script reference. I apologize for misleading you on that.

I'm afraid you will need to upgrade if this feature is important to you.

 

Regards,
Orlin
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
NumericTextBox
Asked by
Steven
Top achievements
Rank 1
Answers by
Orlin
Telerik team
Steven
Top achievements
Rank 1
Share this question
or