How to display blank kendo numeric text box on page load and still allow a min value

1.1k Views Asked by At

I have a kendo numeric text-box with a min value set to zero. I don't want the ability to input negative numbers. The problem is that the initial value gets also set to zero which messes up some validation. Is there a way to have the min be zero and still allow the box to be blank on load? I've tried adding

 value: " "

to noNegativeNumericConfig, but that doesn't seem to work.

html:

 <input class="numeric-entry" kendo-numeric-text-box k-options="noNegativeNumericConfig"

.js file:

  $scope.noNegativeNumericConfig =
     {
         spinners: false,
         decimals: 0,
         format: "#:n0",
         min: 0
     };
1

There are 1 best solutions below

0
On

Probably you will need to do on the widget initialization, like:

$scope.noNegativeNumericConfig =
     {
         spinners: false,
         decimals: 0,
         format: "#:n0",
         min: 0,
         value:" "
     };

Hope this help