How to disable typing in values in Dojo's NumberSpinner?
        Posted  
        
            by callie16
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by callie16
        
        
        
        Published on 2010-05-14T02:56:09Z
        Indexed on 
            2010/05/14
            3:04 UTC
        
        
        Read the original article
        Hit count: 223
        
dojo
Hi, is there a way to disable typing in of values in the NumberSpinner of Dojo? Or is there a way for me to set back a previous value to it?
Here's a sample situation:
I have a spinner where the range is 1-3. However, the user types in an invalid value... say, a letter. The usual error handling happens. However, if the user deletes the value and focuses out (e.g. goes to another widget/control/etc. in the page), the spinner stays blank. Either I reset it to the last valid value or I disable typing so that the user can just use the up and down arrows to manipulate the widget.
Any thoughts?
Thanks!
© Stack Overflow or respective owner