New to Kendo UI for jQuery? Download free 30-day trial

Keep Trailing Zeros in NumericTextBox


Product Version 2018.1 117
Product Progress® Kendo UI® NumericTextBox for jQuery


When I enter the 0.0010 value, it renders 0.001. When the widget loses focus, it reformats the number to 0.0010.

How can I format the number in a NumericTextBox so that it shows four decimal places?


This functionality is not part of the built-in NumericTextBox settings but is already submitted as a feature request in the UserVoice forum. Popular requests get prioritized on the team's roadmap. To upvote the feature request, refer to

Suggested Workaround

Add the trailing zeros programmatically both on spin and on focus of the input. You can further elaborate on the example so it reflects the globalization practices and check if the decimals are properly rendered when used on multiple NumericTextBoxes.

    <input id="numerictextbox" />
          var numeric = $("#numerictextbox").kendoNumericTextBox({
            format: "n4",
            decimals: 4,
            step: 0.0001,
            restrictDecimals: true,
            spin: function(e){
              var inputElement = this.element;
          }).on("focus", function(e){
            var inputElement = $(this);

          function addTrailingZeros(input, numeric){
            // floats
            if(input.val().split(".").length > 1
               && input.val().split(".")[1].length < numeric.options.decimals){
              var inputValue = input.val() + "0";
            // integers
            if(input.val() && input.val().split(".").length === 1){
              var inputValue = input.val() + "." + Array(numeric.options.decimals + 1).join("0");
In this article