Decimal places

3 posts, 0 answers
  1. Mac
    Mac avatar
    18 posts
    Member since:
    Mar 2010

    Posted 11 Aug 2015 Link to this post

    At the following URL:

    It shows 3 decimal places requested in the code 

    // create Curerncy NumericTextBox from input HTML element
    $("#currency").kendoNumericTextBox({ format: "c", decimals: 3});​

    However, the display only shows 2.

    Changing the decimals in the options seems to have no results in the Dojo.

    My actual goal is to have no decimals, how can I do this?

  2. Konstantin Dikov
    Konstantin Dikov avatar
    2466 posts

    Posted 12 Aug 2015 Link to this post

    Hello Calvin,

    The format property of the widget will determine the display format and the decimals property will define the precision with which the value should be saved. 

    As for your particular requirement you need to use "c0" in the format and remove the decimals property:
        format: "c0"

    Hope this helps.

    Konstantin Dikov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Mac
    Mac avatar
    18 posts
    Member since:
    Mar 2010

    Posted 12 Aug 2015 in reply to Konstantin Dikov Link to this post

    Thanks Konstantin!

     May I recommend updating the demo so that it reflects that?

Back to Top