Wijmo User Guide > Widgets > Input Widgets > InputNumber > Markup And Scripting |
The HTML markup for a wijInputNumber widget looks like this.
Drop down to view markup
You can initialize the widget with the following jQuery script. The options set in this script create an input that only allows users to enter numbers (no percentages, no currency). The user cannot input anything lower than -100 or higher than 1,000, and the input always displays to the third decimal place, even when the widget holds no value. It also displays a spinner so that users can increase or decrease the value instead of having to type it in.
Drop down to view script
The markup and script featured here results in the following live widget. Click the spinner buttons to increment and decrement the numbers.