0

我有一个最小值设置为零的剑道数字文本框。我不想要输入负数的能力。问题是初始值也被设置为零,这会扰乱一些验证。有没有办法让最小值为零并且仍然允许该框在加载时为空白?我试过添加

 value: " "

到 noNegativeNumericConfig,但这似乎不起作用。

html:

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

.js 文件:

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

1 回答 1

0

可能您需要对小部件进行初始化,例如:

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

希望这有帮助

于 2016-02-08T17:50:55.157 回答