/** * Set the number of years to display in the years selection dropdown. The range of years will be * centered on the selected date. */ public void setVisibleYearCount(int numberOfYears) { if (numberOfYears <= 0) { throw new IllegalArgumentException("The number of years to display must be positive"); } visibleYearCount = numberOfYears; getMonthSelector().refresh(); }
/** * Creates a new date picker. * * @param monthAndYearSelector the month selector * @param view the view * @param model the model */ protected DatePicker(MonthSelector monthAndYearSelector, CalendarView view, CalendarModel model) { this.model = model; this.monthAndYearSelector = monthAndYearSelector; monthAndYearSelector.setDatePicker(this); this.view = view; view.setDatePicker(this); view.setup(); monthAndYearSelector.setup(); this.setup(); setCurrentMonth(new Date()); addStyleToDates(css().dayIsToday(), new Date()); }
/*************************************** * Overridden to provide access to click handler. * * @see MonthSelector#addMonths(int) */ @Override protected void addMonths(int nMonthAdd) { super.addMonths(nMonthAdd); }
/** * Set if the user can navigate through the years via a set of backward and forward buttons. */ public void setYearArrowsVisible(boolean yearArrowsVisible) { this.yearArrowsVisible = yearArrowsVisible; getMonthSelector().refresh(); }
/** * Creates a new date picker. * * @param monthAndYearSelector the month selector * @param view the view * @param model the model */ protected DatePicker(MonthSelector monthAndYearSelector, CalendarView view, CalendarModel model) { this.model = model; this.monthAndYearSelector = monthAndYearSelector; monthAndYearSelector.setDatePicker(this); this.view = view; view.setDatePicker(this); view.setup(); monthAndYearSelector.setup(); this.setup(); setCurrentMonth(new Date()); addStyleToDates(css().dayIsToday(), new Date()); }
/** * If the <code>dropdownVisible</code> is equal to true, the user will be able to change the current month and * the current year of the date picker via two dropdown lists. */ public void setYearAndMonthDropdownVisible(boolean dropdownVisible) { this.yearAndMonthDropdownVisible = dropdownVisible; getMonthSelector().refresh(); }
/** * Creates a new date picker. * * @param monthAndYearSelector the month selector * @param view the view * @param model the model */ protected DatePicker(MonthSelector monthAndYearSelector, CalendarView view, CalendarModel model) { this.model = model; this.monthAndYearSelector = monthAndYearSelector; monthAndYearSelector.setDatePicker(this); this.view = view; view.setDatePicker(this); view.setup(); monthAndYearSelector.setup(); this.setup(); setCurrentMonth(new Date()); addStyleToDates(css().dayIsToday(), new Date()); }
/** * Refreshes all components of this date picker. */ protected final void refreshAll() { highlighted = null; getModel().refresh(); getView().refresh(); getMonthSelector().refresh(); if (isAttached()) { ShowRangeEvent.fire(this, getFirstDate(), getLastDate()); } getView().setAriaSelectedCell(value); }
/** * Set the number of years to display in the years selection dropdown. The range of years will be * centered on the selected date. */ public void setVisibleYearCount(int numberOfYears) { if (numberOfYears <= 0) { throw new IllegalArgumentException("The number of years to display must be positive"); } visibleYearCount = numberOfYears; getMonthSelector().refresh(); }
/** * Set the number of years to display in the years selection dropdown. The range of years will be * centered on the selected date. */ public void setVisibleYearCount(int numberOfYears) { if (numberOfYears <= 0) { throw new IllegalArgumentException("The number of years to display must be positive"); } visibleYearCount = numberOfYears; getMonthSelector().refresh(); }
/** * Set if the user can navigate through the years via a set of backward and forward buttons. */ public void setYearArrowsVisible(boolean yearArrowsVisible) { this.yearArrowsVisible = yearArrowsVisible; getMonthSelector().refresh(); }
/** * If the <code>dropdownVisible</code> is equal to true, the user will be able to change the current month and * the current year of the date picker via two dropdown lists. */ public void setYearAndMonthDropdownVisible(boolean dropdownVisible) { this.yearAndMonthDropdownVisible = dropdownVisible; getMonthSelector().refresh(); }
/** * Set if the user can navigate through the years via a set of backward and forward buttons. */ public void setYearArrowsVisible(boolean yearArrowsVisible) { this.yearArrowsVisible = yearArrowsVisible; getMonthSelector().refresh(); }
/** * If the <code>dropdownVisible</code> is equal to true, the user will be able to change the current month and * the current year of the date picker via two dropdown lists. */ public void setYearAndMonthDropdownVisible(boolean dropdownVisible) { this.yearAndMonthDropdownVisible = dropdownVisible; getMonthSelector().refresh(); }
/** * Refreshes all components of this date picker. */ protected final void refreshAll() { highlighted = null; getModel().refresh(); getView().refresh(); getMonthSelector().refresh(); if (isAttached()) { ShowRangeEvent.fire(this, getFirstDate(), getLastDate()); } getView().setAriaSelectedCell(value); }
/** * Refreshes all components of this date picker. */ protected final void refreshAll() { highlighted = null; getModel().refresh(); getView().refresh(); getMonthSelector().refresh(); if (isAttached()) { ShowRangeEvent.fire(this, getFirstDate(), getLastDate()); } getView().setAriaSelectedCell(value); }