如何清除DatePicker [英] How to clear a DatePicker
本文介绍了如何清除DatePicker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有 DatePicker 来选择生日。
这将用于某些过滤,过滤后,我会比如 重置的值,即DatePicker应该为空。
This is going to be used for some filtering, and after the filtering, I will like the value to be reseted, i.e. the DatePicker should go blank.
任何帮助???
推荐答案
如果要清除 TextField
> DatePicker ,您可以使用:
If you want to clear the TextField
of the DatePicker
, you can use :
datepicker.getEditor().clear();
如果要清除值和文本字段,请使用:
If you want to clear the value and the textfield, use :
datePicker.setValue(null);
这篇关于如何清除DatePicker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文