1

I am using GWT ext and trying to get the values from page and setting it in pojo class.

Except date field all the values are obtained using

(TimeField) ComponentMgr.getComponent(id[2])).getText())....

But while using the same snippet for date field it fails to perform.

Can any one help me with this issue please......

Sai Prasad
  • 163
  • 1
  • 4
  • 13

3 Answers3

1

This works fine for me:

dateField.getText();

Sai Prasad
  • 163
  • 1
  • 4
  • 13
0

I have also used date field many times. DateField field = new DateField(); field.getValue();

This will return value as Date instance.So If your pojo has date property then you need to parse it. For the string value you should go for getText() method.

Sanjay Jain
  • 3,518
  • 8
  • 59
  • 93
0

If you want to convert a string to a date field, you'll have to parse it. Bear in mind that there are already out-of-the-box date pickers in GWT 1.6. If you're using a version that does not come with date pickers, there are several projects like this.

Miguel Ping
  • 18,082
  • 23
  • 88
  • 136