com.google.gwt.user.datepicker.client.DatePicker.getCurrentMonth()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(190)

本文整理了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

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

  1. private void disableDaysNotInCurrentMonth(Date startDay, Date endDay) {
  2. List<Date> disableDates = new LinkedList<Date>();
  3. Date firstDayOfMonth = firstDayOfMonth(calendarWidget
  4. .getCurrentMonth());
  5. Date lastDayOfMonth = lastDayOfMonth(calendarWidget
  6. .getCurrentMonth());
  7. Date dayAfterEnd = (Date) endDay.clone();
  8. CalendarUtil.addDaysToDate(dayAfterEnd, 1);
  9. for (Date day = startDay; day.before(dayAfterEnd); CalendarUtil
  10. .addDaysToDate(day, 1)) {
  11. if (day.before(firstDayOfMonth) || day.after(lastDayOfMonth)) {
  12. disableDates.add((Date) day.clone());
  13. }
  14. }
  15. if (!disableDates.isEmpty()) {
  16. calendarWidget.setTransientEnabledOnDates(false, disableDates);
  17. }
  18. }

代码示例来源:origin: de.esoco/gewt

  1. /***************************************
  2. * Returns the date of the month that is currently displayed by the date
  3. * picker of this instance.
  4. *
  5. * @return The date of the selected month
  6. */
  7. public Date getMonth()
  8. {
  9. return getDateWidget().getDatePicker().getCurrentMonth();
  10. }

代码示例来源:origin: com.vaadin.addon/vaadin-touchkit-agpl

  1. private void updatePrevNextButtons() {
  2. Date currentMonth;
  3. currentMonth = justMonth(calendarWidget.getCurrentMonth());
  4. if (min != null) {
  5. setPrevButtonEnabled(currentMonth.after(min));
  6. } else {
  7. setPrevButtonEnabled(true);
  8. }
  9. if (max != null) {
  10. setNextButtonEnabled(currentMonth.before(max));
  11. } else {
  12. setNextButtonEnabled(true);
  13. }
  14. }

代码示例来源:origin: com.vaadin.addon/vaadin-touchkit-agpl

  1. @Override
  2. public void onClick(ClickEvent event) {
  3. if (event.getSource() == okButton) {
  4. Date value = calendarWidget.getValue();
  5. if (resolution == Resolution.MONTH) {
  6. value = calendarWidget.getCurrentMonth();
  7. } else if (resolution == Resolution.TIME) {
  8. value = trySetTimeFromTimeBoxText(value);
  9. }
  10. ValueChangeEvent.fire(CalendarOverlay.this, value);
  11. this.hide();
  12. } else if (event.getSource() == cancelButton) {
  13. this.hide(false);
  14. }
  15. }

代码示例来源:origin: com.vaadin.addon/vaadin-touchkit-agpl

  1. Date currentMonth = justMonth(calendarWidget.getCurrentMonth());
  2. if (min != null) {
  3. if (currentMonth.before(justMonth(min))) {

相关文章