Right. I used a plain DateField of GXT 3.1.0 and have been able to reproduce your problem:
Originally Posted by rondestvedt
- Select a Date more then 20 years in future, like 1/1/2038, via Datepicker
- DateField shows 1/1/38, since DATE_SHORT is default format.
- Open Datepicker again and you see it is January 1st, 1938.
But I don't consider this a bug of Datepicker. Datepicker is just a nice presenter and choosing element of Dates. And I don't think DateField ist doing something wrong, either. What do you expect of DateField with PredefinedFormat.DATE_SHORT? It is doing its best guess on 2digit years.
The problem I see is this: PredefinedFormat.DATE_SHORT should not be the default for Datefield! 2-digit year has its problems. If someone explicitly set 2-digit year, he has to deal with it.
Seems like this has changed recently. The form example (GXT 3.1.3) doesn't set a format for the field, but it still has a 4-digit year. You should consider doing this, too:
DateField df = new DateField();