看看这段代码,
DateBox myDateBox=new DateBox();
myDateBox.getDatePicker().setYearAndMonthDropdownVisible(true);
DateTimeFormat dateFormat = DateTimeFormat.getFormat("DD-MM-YYYY");
myDateBox.setFormat(new DateBox.DefaultFormat(dateFormat));
好的,当我点击DateBox时,DatePicker弹出,但我看不到像1600年那样的年份,那么如何在DatePicker中添加更多年份?
Alos,我想在选择日期时使用格式为DD-MM-YYYY,但是点击日期时DateBox中没有出现任何日期?
答案 0 :(得分:0)
像1600年这样的年代,我无法帮助你。但对于格式,也许问题是大写。我认为你应该使用格式
DateTimeFormat dateFormat = DateTimeFormat.getFormat("dd-MM-yyyy");