View Full Version : [FNR] GXT 2.2.4 DatePicker bug

5 Jun 2011, 10:45 PM
- There is a bug in update(DateWrapper date) method of DatePicker.
If startDay variable is not assigned (Integer.MIN_VALUE) and firstDOW variable has locale specified different than Sunday value (for example Satarday for fa_IR locale or Monday for ru_RU locale) DatePicker renders wrong.

The problem is in these lines

if (startingPos <= startDay) {
startingPos += 7;
Since version 2.2.2 or later startDay default value is Integer.MIN_VALUE so this check doesn't work unless startDay value is assigned.
To fix the issue checking condition should be changed to something like this one

if (startingPos < firstDOW) {
startingPos += 7;

- GXT version: 2.2.4
- Host mode / web mode / both: host mode (didn't test other)
- Browser and version: FF 4.0.1 (I think other browser will have same issue)
- Operating System: Windows 7
- Sample code: just run default demo with any locale which has different than Sunday default first day of week (see shot)

http://img97.imageshack.us/img97/9813/screennc.th.png (http://img97.imageshack.us/i/screennc.png/)

Uploaded with ImageShack.us (http://imageshack.us)

5 Jun 2011, 11:41 PM
This is arleady fixed in SVN

5 Jun 2011, 11:58 PM
Sry, don't have access to so didn't know.