Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15677 closed defect (fixed)

[ccla]The Month wheel of the SpinWheelDatePicker is not correctly initialized on BlackBerry

Reported by: Soyhy Lim Owned by: Eric Durocher
Priority: undecided Milestone: 1.8
Component: DojoX Mobile Version: 1.8.0b1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by cjolif)

The list of months in the SpinWheelDatePicker is wrong on BlackBerry. April and June are missing, instead you have twice March and July. See the attached screenshots.

This bug can be reproduced on BlackBerry Torch 9860 running 7.1 OS and Torch 9800 running 6.0. I have not reproduced it on desktop browsers or other devices I have tested.

Not specific to Dojo at all, this problem is caused by a JavaScript bug on BlackBerry, and it can be reproduced by a simple JavaScript code:

var date = new Date(2000, 0, 1); var day, month; console.log("The 1st of each month:"); for (month = 0; month < 12; month++) {

date.setMonth(month); console.log("Month, set = " + month + ", get = " + date.getMonth() + ", Date: " + date);

}

Will produce:

16The 1st of each month: testmonth.html:19Month, set = 0, get = 0, Date: Sat Jan 01 2000 00:00:00 GMT+0100 testmonth.html:19Month, set = 1, get = 1, Date: Tue Feb 01 2000 00:00:00 GMT+0100 testmonth.html:19Month, set = 2, get = 2, Date: Wed Mar 01 2000 00:00:00 GMT+0100 testmonth.html:19Month, set = 3, get = 2, Date: Fri Mar 31 2000 23:00:00 GMT+0100 testmonth.html:19Month, set = 4, get = 4, Date: Wed May 31 2000 23:00:00 GMT+0200 testmonth.html:19Month, set = 5, get = 6, Date: Sat Jul 01 2000 23:00:00 GMT+0200 testmonth.html:19Month, set = 6, get = 6, Date: Sat Jul 01 2000 23:00:00 GMT+0200 testmonth.html:19Month, set = 7, get = 7, Date: Tue Aug 01 2000 23:00:00 GMT+0200 testmonth.html:19Month, set = 8, get = 8, Date: Fri Sep 01 2000 23:00:00 GMT+0200 testmonth.html:19Month, set = 9, get = 9, Date: Sun Oct 01 2000 23:00:00 GMT+0200 testmonth.html:19Month, set = 10, get = 10, Date: Wed Nov 01 2000 23:00:00 GMT+0100 testmonth.html:19Month, set = 11, get = 11, Date: Fri Dec 01 2000 23:00:00 GMT+0100

As you can see, the months of March and June are not correctly set.

The workaround for the SpinWheelDatePicker is to create the date based on the 2nd when filling the Month wheel.

Attachments (3)

DatePickerBug01.jpg (151.0 KB) - added by Soyhy Lim 7 years ago.
DatePickerBug02.jpg (149.6 KB) - added by Soyhy Lim 7 years ago.
dojox-ticket_15677.patch (460 bytes) - added by Soyhy Lim 7 years ago.
Soyhy

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by Soyhy Lim

Attachment: DatePickerBug01.jpg added

Changed 7 years ago by Soyhy Lim

Attachment: DatePickerBug02.jpg added

Changed 7 years ago by Soyhy Lim

Attachment: dojox-ticket_15677.patch added

Soyhy

comment:1 Changed 7 years ago by Soyhy Lim

Attached patch, file dojox-ticket_15677.patch, workaround for SpinWheelDatePicker? issue on BlackBerry?. Soyhy Lim (IBM, CCLA).

comment:2 Changed 7 years ago by cjolif

Description: modified (diff)
Status: newopen

comment:3 Changed 7 years ago by cjolif

Resolution: fixed
Status: openclosed

In [29253]:

fixes #15677. Workarounding a BlackBerry bug when setting dates. Thanks Soyhy Lim (IBM, CCLA). !strict.

comment:4 Changed 7 years ago by bill

Milestone: tbd1.8
Note: See TracTickets for help on using tickets.