tags:

views:

21

answers:

1

I hava and GXT form with a DateField. When I clear the form by invoking the clear() method on my form panel, my date field is cleared and stays empty. But I want the date field to display current date after clearing. How can I do this?

A: 

Derive a custom component from DateField and do this:

@Override
public void clear() {
    super.clear();
    setValue(new Date());
}
kabram