dijit.Calendar.goToToday does not work
create a new dijit.Calendar and call goToToday() on it. Nothing will happen.
This is because goToToday invokes "this.dateClassObj()" and not "new this.dateClassObj()". The former returns a string and the latter returns a Date object. The string would be fine, but _setValueAttr calls compare which uses the unary + operator to turn the value into a number (presumably in an attempt to copy the date). This would work fine with a Date object but not with a string.
I believe the correct thing to do here is change goToToday() to use the 'new' operator. It looks like when this function was first introduced (r11785), it did use the 'new' operator. When _Calendar was converted to use dateClassObj instead of just date, the 'new' operator was left out (r17172)
Change History (4)
Milestone: |
tbd →
1.5
|
Owner: |
set to Adam Peller
|
Status: |
new →
assigned
|
Resolution: |
→ fixed
|
Status: |
assigned →
closed
|
(In [21602]) Fixes regression in goToToday() from r17172. Fixes #10864, refs #5074 !strict