Setting displayable decimal places using data-attribute initialization

2 posts, 0 answers
  1. Robert
    Robert avatar
    39 posts
    Member since:
    Oct 2012

    Posted 28 Jun 2013 Link to this post

    If I understand numerictextbox correctly, the decimals property allows me to set how many decimal places are shown; if I understand data-attribute initialization correctly, I can set the decimals property use data-decimals="num"

    I have the following numerictextbox:

                   <input data-role="numerictextbox" value="15.284123" data-decimals="6" data-step="0.01"/>

    I only see the value "15.28" displayed.  How can I get all 6 decimal places to be displayed

  2. Georgi Krustev
    Georgi Krustev avatar
    3723 posts

    Posted 01 Jul 2013 Link to this post

    Hello Robert,

    The decimals option controls the NumericTextBox value precision. In other words, if the decimals is set to 6, the widget will persist the value fraction up to the sixth digit. In order to change number formatting you will need to define the format of the widget:

    <input data-role="numerictextbox"
    For more information about numeric formats check this help topic.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top