RestrictDecimals Option Not working.

4 posts, 0 answers
  1. Steven
    Steven avatar
    3 posts
    Member since:
    Sep 2015

    Posted 11 Oct Link to this post

    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

  2. Orlin
    Admin
    Orlin avatar
    22 posts

    Posted 12 Oct Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
  4. Steven
    Steven avatar
    3 posts
    Member since:
    Sep 2015

    Posted 12 Oct in reply to Orlin Link to this post

    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

  5. Orlin
    Admin
    Orlin avatar
    22 posts

    Posted 13 Oct Link to this post

    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.
     
Back to Top
Kendo UI is VS 2017 Ready