开发者

GXT date field - show date after clearing

开发者 https://www.devze.com 2023-01-05 10:20 出处:网络
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 displ

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?


Derive a custom component from DateField and do this:

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号