Number format without decimals

2 posts, 0 answers
  1. Robert
    Robert avatar
    4 posts
    Member since:
    Jan 2013

    Posted 10 Mar 2015 Link to this post

    Hello.  I would like this to work.  I know that format: 'g' will give me a number without decimals, but then it doesn't have a comma separator.  
    Thank you.

    $('.numeric').kendoNumericTextBox({
            format: "n",
            decimals: 0
        });
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 12 Mar 2015 Link to this post

    Hello Robert,

    The desired format can be accomplished using custom numeric formats available in Kendo UI. The custom format that displays the numbers in "g" format is "#.#":
    $('.numeric').kendoNumericTextBox({
      format: "#.#",
      decimals: 0
    });
    You can find more details about the support formats in this help topic.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top