Tuesday, April 10, 2012

Javascript (with dijit.form.NumberTextBox) variable / 'NaN' behaving weirdly

I have a couple of dijit.form.NumberTextBox, Which return javascript Number values if valid data is in the textboxes, otherwise NaN. I get this strange behavior. When I checked in firebug (both the textboxes are blank):



>>> hours
NaN
>>> minutes
NaN
>>> minutes == NaN
false
>>> hours == NaN
false
>>> hours == minutes
false


Why is it behaving so?





No comments:

Post a Comment