PDA

View Full Version : DatePicker bug in GXT 2.2.5



kjuik
27 Jun 2012, 1:59 AM
1. Use a DateField widget
2. Open its DatePicker
3. Go through its screens so the dates shown are beyond validation limit
4. The invalid days get a tooltip informing about their invalidity
5. Go back through the screens to see valid days
6. The tooltip doesn't go off

The problem exists in the last lines of DatePicker.setCellStyle method, which is:


if (t > max || t < min) {
fly(cell).addStyleName("x-date-disabled");
if (t > max)
cell.setTitle(messages.getMaxText());
else
cell.setTitle(messages.getMinText());
}

while it should rather be



if (t > max || t < min) {
fly(cell).addStyleName("x-date-disabled");
if (t > max)
cell.setTitle(messages.getMaxText());
else
cell.setTitle(messages.getMinText());
} else {
cell.setTitle("");
}