Numeric TextBox won't hold my value right.

2 posts, 0 answers
  1. Stacey
    Stacey avatar
    55 posts
    Member since:
    Aug 2013

    Posted 23 Oct 2013 Link to this post

    Using the following code...

    <input id="${Statistic.Name}-size"
        type="number"
        value="30"
        class="dark"
        style="width: 100px; float: left;"
        data-bind="value: Measurement"
        data-role="numerictextbox"
        data-decimals="5"
        data-step="0.001" />
    <h1 data-bind="text: Statistic.Name"></h1>
    The numeric text box is formatted exactly how I want, but if I type in "0.005", then I click somewhere else, the text box changes to "0.01".

    However if I click on it again, it changes back to 0.005, and then back to 0.01 when I click elsewhere.
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 24 Oct 2013 Link to this post

    Hello Stacey,

     
    You will need also specify the format of the widget. The default one is "n". You can set "n3" format in order to allow 3 digits long fraction.

    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