SimRo
SimRo

Reputation: 125

kendo-ui numeric textbox not working a step value of 0.001

I'm having some troubles with Kendo UI's numeric text box. Namely, it will not working with a step value of 0.001. In the example code below I have gotten 0.001 to work with HTML5 but it does not increment with Kendo. If I change it to 0.01 then it works fine. Does anyone know why or have any work arounds?

    <input type="number" id="inputN" value="1.010" step="0.001" style="width: 100px;" />

    <input id="inputNum" value="1.010" />

    <script type="text/javascript">
        $(document).ready(function () {
            $('#inputNum').kendoNumericTextBox({
                    format: '#.000',
                    step: 0.001
                });
        });
    </script>

Upvotes: 2

Views: 1957

Answers (1)

OnaBai
OnaBai

Reputation: 40887

You need to combine it with decimals option (specifies the number precision, if not set precision defined by current culture is used.)

$('#inputNum').kendoNumericTextBox({
    format  : '#.000',
    step    : 0.001,
    decimals: 3
});

Upvotes: 1

Related Questions