Update Value on Spin
The following example demonstrates how to update the value of the NumericTextBox on spin
.
<div id="example" ng-app="app">
<div class="demo-section k-content" ng-controller="mainCtrl">
<div>
<h4>Set Value</h4>
<p>
<input kendo-numeric-text-box="numeric"
k-min="0" k-max="100"
k-on-spin="updateValue()"
k-ng-model="value"/>
</p>
</div>
<div>
<h4>Result</h4>
Value: {{ value }}
</div>
</div>
<script>
angular.module('app', ["kendo.directives"])
.controller("mainCtrl", ['$scope', function ($scope) {
$scope.value = 50;
$scope.updateValue = function() {
$scope.value = $scope.numeric.value();
};
}]);
</script>
</div>
See Also
- NumericTextBox JavaScript API Reference
- How to Change Text Color
- How to Persist Old Value
- How to Select All Text on Focus
- How to Use Custom Culture Script
For more runnable examples on the Kendo UI NumericTextBox, browse its How To documentation folder.