DateField


  • If DateField is not initialized (it has value null), the editor is also uninitialized.

  • The date and time values presented in the user interface are presented as local time in the time zone defined for the DateField.

  • DateField's zero value (epoch) is January 1, 1970, 00:00:00 GMT.

The DateField can be constructed to a certain time zone with the method TimeZone.getTimeZone. The date presented to the user is calculated based on the time zone from the UTC date value passed to the date field. For example:

DateField df = new DateField("Helsinki time",
                             DateField.DATE_TIME, 
                             TimeZone.getTimeZone("GMT+02:00"));

df.setTime(0);