fullinet
4 Jan 2012, 7:31 AM
- Detailed description of the problem
In the DatePicker while navigating the days with the shortcuts keys the current selected day isn't show with the "x-date-selected" style, although the navigation is working fine.
You can test it in the Birthday DateField the Forms example in the "Explorer Demo" ( http://www.sencha.com/examples/explorer.html#forms )
This was correctly working on GXT 2.2.0 (and maybe later too).
- Possible solutions
I think this bug started when was changed this line of the update(DateWrapper date) method on DatePicker class from:
long sel = date != null ? date.clearTime().getTime() : 0;
to (line 1041):
long sel = value != null ? value.resetTime().getTime() : Long.MIN_VALUE;
So one possible working solution is change that line for:
long sel = date != null ? date.resetTime().getTime() : Long.MIN_VALUE;
but i don't know if it break something that i didn't take into account
Another possible working solution is change a if condition on the setCellStyle(Element cell, Date d, long sel, long min, long max) on DatePicker class (line 961) from:
if (t == sel) {
to:
long tActiveDate = activeDate.getTime();
if ((t == sel || t == tActiveDate) && (t != sel || sel == tActiveDate)) {
- GXT version
GXT 2.2.5 - GWT 2.4.0
- Host mode / web mode / both
Both modes
- Browser and version
IE 8, Firefox 9.0.1, Chrome 17.0.963.12 (dev), Opera 11.60
- Operating System
Windows XP SP3
In the DatePicker while navigating the days with the shortcuts keys the current selected day isn't show with the "x-date-selected" style, although the navigation is working fine.
You can test it in the Birthday DateField the Forms example in the "Explorer Demo" ( http://www.sencha.com/examples/explorer.html#forms )
This was correctly working on GXT 2.2.0 (and maybe later too).
- Possible solutions
I think this bug started when was changed this line of the update(DateWrapper date) method on DatePicker class from:
long sel = date != null ? date.clearTime().getTime() : 0;
to (line 1041):
long sel = value != null ? value.resetTime().getTime() : Long.MIN_VALUE;
So one possible working solution is change that line for:
long sel = date != null ? date.resetTime().getTime() : Long.MIN_VALUE;
but i don't know if it break something that i didn't take into account
Another possible working solution is change a if condition on the setCellStyle(Element cell, Date d, long sel, long min, long max) on DatePicker class (line 961) from:
if (t == sel) {
to:
long tActiveDate = activeDate.getTime();
if ((t == sel || t == tActiveDate) && (t != sel || sel == tActiveDate)) {
- GXT version
GXT 2.2.5 - GWT 2.4.0
- Host mode / web mode / both
Both modes
- Browser and version
IE 8, Firefox 9.0.1, Chrome 17.0.963.12 (dev), Opera 11.60
- Operating System
Windows XP SP3