Is there any way to catch increment and decrement events for dijit.form.NumberSpinner when user presses up or down arrow in this widget? I know "_arrowPressed" event but I don't want to use it for some reasons. I am using onChange event but that doesn't get fired until you lose focus on this widget.
Asked
Active
Viewed 991 times
1 Answers
6
Set intermediateChanges:true
to get onChange
on every change (w/o losing focus):
<div
id="spinner1"
data-dojo-type="dijit/form/NumberSpinner"
data-dojo-props="
name: 'spinner1',
smallDelta: 1,
largeDelta: 10,
constrains: {min: 0, max: 100, places: 0},
value: 10,
intermediateChanges: true
"
></div>
See how it works at this jsFiddle: http://jsfiddle.net/phusick/HCx3w/

phusick
- 7,342
- 1
- 21
- 26