-
Notifications
You must be signed in to change notification settings - Fork 1
supercrsky/swing-datepicker
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
1)可设置年、月、日,显示星期几。
2)可设置是否显示年、时分秒按钮。
3)可自定义约束,如限制选择指定日期,指定星期几。
4)快捷清空选择。
JDatePicker picker = new JDatePicker();
picker.setTextEditable(true);
picker.setShowYearButtons(true);
//显示时分秒功能
picker = new JDatePicker(new UtilDateModel());
//日期范围限制,beginDate为日期类型的开始时间
RangeConstraint constraint = new RangeConstraint(beginDate,new Date());
picker.addDateSelectionConstraint(constraint);
//取值
UtilDateModel dateModel = (UtilDateModel) picker.getModel();
Date date = dateModel.getValue();
About
Swing下的日期选择控件,基于jdatepicker扩展,添加了时分秒功能。
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published