This is a migrated thread and some comments may be shown as answers.

Numeric TextBox won't hold my value right.

1 Answer 49 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Stacey
Top achievements
Rank 1
Stacey asked on 23 Oct 2013, 07:27 PM
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.

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 24 Oct 2013, 08:49 AM
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!
Tags
NumericTextBox
Asked by
Stacey
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or