Class DateBox

java.lang.Object
All Implemented Interfaces:
IsEditor<LeafValueEditor<Date>>, HasAttachHandlers, HasValueChangeHandlers<Date>, HasHandlers, EventListener, TakesValue<Date>, HasEnabled, HasValue<Date>, HasVisibility, IsRenderable, IsWidget

public class DateBox extends Composite implements HasEnabled, HasValue<Date>, IsEditor<LeafValueEditor<Date>>
A text box that shows a DatePicker when the user focuses on it.

CSS Style Rules

.gwt-DateBox
default style name
.dateBoxPopup
Applied to the popup around the DatePicker
.dateBoxFormatError
Default style for when the date box has bad input. Applied by DateBox.DefaultFormat when the text does not represent a date that can be parsed

Example

public class DateBoxExample implements EntryPoint {

  public void onModuleLoad() {
    DateBox dateBox = new DateBox();
    dateBox.setValue(new Date());
    RootPanel.get().add(dateBox);
  }
}