NumberBox
The NumberBox is a widget that displays a numeric value and allows a user to modify it by typing in a value, and incrementing or decrementing it using the keyboard or mouse.
You can create the widget using one of the following approaches.
jQuery
Use thedxNumberBox
jQuery plug-in.HTML<div id="numberBox"></div>
JavaScript$("#numberBox").dxNumberBox({ min: 0, max: 100, showSpinButtons: true, step: 5 });
Knockout
Add a div element and apply thedxNumberBox
binding to this element.HTML<div data-bind="dxNumberBox: { min: 0, max: 100, showSpinButtons: true, step: 5 }"></div>
AngularJS
Add a div element and apply thedx-number-box
directive to this element.HTML<div dx-number-box="{ min: 0, max: 100, showSpinButtons: true, step: 5 }"></div>
Note that DevExtreme widgets require you to link the jQuery library to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on linking these libraries to your project, refer to the Installation article.
You can find detailed information on the principles of working with the widget in the dxNumberBox section of the Editor Widgets article.