View Full Version : Basic Date Field Question

20 Nov 2009, 4:27 PM
I have a DateField object . First Time value would be null. What i want to do is I want to capture the value of DateField on change . So i have my code like this

DateField df = new DateField ();
df.addListener(Events.Change, new Listener<FieldEvent>() {
public void handleEvent(FieldEvent p_event) {

GWT.Log("event fired" ,null);

First time since the value is null and user picks the value from date picker it does not fire the Change event . But after that it fires the change event . Is there a way by which I can capture the first time value . (making it fire the change event )

Is there any other event i need to configure.

23 Nov 2009, 1:00 AM
maybe there's a better way, I did it like this:

datefield.getDatePicker().addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
Info.display("select", "");