本文整理了Java中com.google.gwt.user.datepicker.client.DatePicker.getCurrentMonth()
方法的一些代码示例,展示了DatePicker.getCurrentMonth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DatePicker.getCurrentMonth()
方法的具体详情如下:
包路径:com.google.gwt.user.datepicker.client.DatePicker
类名称:DatePicker
方法名:getCurrentMonth
[英]Gets the current month the date picker is showing.
A datepicker may show days not in the current month. It must show all days in the current month.
[中]获取日期选择器显示的当前月份。
日期选择器可能会显示不在当前月份的日期。它必须显示当前月份的所有天数。
代码示例来源:origin: com.vaadin.addon/vaadin-touchkit-agpl
private void disableDaysNotInCurrentMonth(Date startDay, Date endDay) {
List<Date> disableDates = new LinkedList<Date>();
Date firstDayOfMonth = firstDayOfMonth(calendarWidget
.getCurrentMonth());
Date lastDayOfMonth = lastDayOfMonth(calendarWidget
.getCurrentMonth());
Date dayAfterEnd = (Date) endDay.clone();
CalendarUtil.addDaysToDate(dayAfterEnd, 1);
for (Date day = startDay; day.before(dayAfterEnd); CalendarUtil
.addDaysToDate(day, 1)) {
if (day.before(firstDayOfMonth) || day.after(lastDayOfMonth)) {
disableDates.add((Date) day.clone());
}
}
if (!disableDates.isEmpty()) {
calendarWidget.setTransientEnabledOnDates(false, disableDates);
}
}
代码示例来源:origin: de.esoco/gewt
/***************************************
* Returns the date of the month that is currently displayed by the date
* picker of this instance.
*
* @return The date of the selected month
*/
public Date getMonth()
{
return getDateWidget().getDatePicker().getCurrentMonth();
}
代码示例来源:origin: com.vaadin.addon/vaadin-touchkit-agpl
private void updatePrevNextButtons() {
Date currentMonth;
currentMonth = justMonth(calendarWidget.getCurrentMonth());
if (min != null) {
setPrevButtonEnabled(currentMonth.after(min));
} else {
setPrevButtonEnabled(true);
}
if (max != null) {
setNextButtonEnabled(currentMonth.before(max));
} else {
setNextButtonEnabled(true);
}
}
代码示例来源:origin: com.vaadin.addon/vaadin-touchkit-agpl
@Override
public void onClick(ClickEvent event) {
if (event.getSource() == okButton) {
Date value = calendarWidget.getValue();
if (resolution == Resolution.MONTH) {
value = calendarWidget.getCurrentMonth();
} else if (resolution == Resolution.TIME) {
value = trySetTimeFromTimeBoxText(value);
}
ValueChangeEvent.fire(CalendarOverlay.this, value);
this.hide();
} else if (event.getSource() == cancelButton) {
this.hide(false);
}
}
代码示例来源:origin: com.vaadin.addon/vaadin-touchkit-agpl
Date currentMonth = justMonth(calendarWidget.getCurrentMonth());
if (min != null) {
if (currentMonth.before(justMonth(min))) {
内容来源于网络,如有侵权,请联系作者删除!