pombreda / google-web-toolkit-incubator

Automatically exported from code.google.com/p/google-web-toolkit-incubator
0 stars 0 forks source link

setDate and getDate methods for DateBox #213

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If you want to see this feature/enhancement implemented, please star this 
issue by clicking on the star in the upper left hand corner of this page.

== Enhancement Description ==

Methods to set and fetch the date value displayed in the text box directly 
instead of instead of using getTextBox or getText.

  public Date getDate() {
      try {
          return dateFormatter.parse(box.getText());
      }
      catch(Exception e) {
          return null;
      }
  }
  public void setDate(Date d) {
          if (d!=null)
              setText(dateFormatter.format(d));
          else
              clear();
  }

Original issue reported on code.google.com by mysta...@gmail.com on 18 Dec 2008 at 6:19

GoogleCodeExporter commented 9 years ago
DateBox has graduated, so now these type of issues should be entered on the gwt 
site.

There, the setValue and getValue methods do exactly what you want.

Original comment by ecc%google.com@gtempaccount.com on 7 Jan 2009 at 4:50