NumberBox

A textbox widget that enables a user to enter numeric values.

Included in: dx.phonejs.js, dx.webappjs.js, dx.all.js

The dxNumberBox widget allows a user to enter a number between the specified min and max configuration option values.

You can create a widget using one of the following approaches.

  • jQuery
    Use the dxNumberBox 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 the dxNumberBox binding to this element.

    HTML
    <div data-bind="dxNumberBox: {
        min: 0,
        max: 100,
        showSpinButtons: true,
        step: 5
    }"></div>
  • Angular
    Add a div element and apply the dx-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 and Globalize libraries to your application. If you use the Knockout or Angular approach, the Knockout or Angular library is also required.

See Also

You can find detailed information on the principles of working with the widget in the dxNumberBox section of the Editor Widgets article.

View Demo

Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the dxNumberBox widget.

Methods

This section describes the members used to manipulate the widget.

Events

This section describes events exposed by this widget.