Community
Participate
Working Groups
Build Identifier: M20100909-0800 Given a DateTime control with a currently set month that has less than 31 days (e.g. currently set date is 2/3/2011) when you try to set a date that has a day of month of 31 (e.g. 12/31/2010) then only the month and year of the date to be set are updated, the day of month stays at its initial value. Looking at the code of SWTBotDateTime#setDate(Date) it looks like the order of method calls on the widget is wrong: setYear, setDay, and then setMonth. It should be setYear, setMonth, and then setDay. Reproducible: Always Steps to Reproduce: 1. Set the date of a DateTime widget to 2/3/2011 in (3rd February 2011) 2. Call setDate( new Date( 110, 11, 31 )) on the SWTBotDateTime instance representing the DateTime widget 3. The date is set incorrectly to 12/3/2010 (3rd December 2010)
Fixed in revision f86c968. See https://github.com/ketan/SWTBot/commit/f86c968 for the fix and test case.
Created attachment 188270 [details] mylyn/context/zip
Sorry, that would be revision b918d9e55d27df81d32cb1030457db07815f23c6 and not f86c968 as I mentioned in previous commit.
Wow, that was fast! Thanks!