/** * Returns the first shown date. * * @return the first date. */ // Final because the view should always control the value of the first date. public final Date getFirstDate() { return view.getFirstDate(); }
/** * Is the date currently shown in the date picker? * * @param date * * @return is the date currently shown */ public boolean isDateVisible(Date date) { CalendarView r = getView(); Date first = r.getFirstDate(); Date last = r.getLastDate(); return (date != null && (CalendarUtil.isSameDate(first, date) || CalendarUtil.isSameDate(last, date) || (first.before(date) && last.after(date)))); }
/** * Adds a show range handler and immediately activate the handler on the * current view. * * @param handler the handler * @return the handler registration */ public HandlerRegistration addShowRangeHandlerAndFire( ShowRangeHandler<Date> handler) { ShowRangeEvent<Date> event = new ShowRangeEvent<Date>( getView().getFirstDate(), getView().getLastDate()) { }; handler.onShowRange(event); return addShowRangeHandler(handler); }
/** * Returns the first shown date. * * @return the first date. */ // Final because the view should always control the value of the first date. public final Date getFirstDate() { return view.getFirstDate(); }
/** * Returns the first shown date. * * @return the first date. */ // Final because the view should always control the value of the first date. public final Date getFirstDate() { return view.getFirstDate(); }
/** * Is the date currently shown in the date picker? * * @param date * * @return is the date currently shown */ public boolean isDateVisible(Date date) { CalendarView r = getView(); Date first = r.getFirstDate(); Date last = r.getLastDate(); return (date != null && (CalendarUtil.isSameDate(first, date) || CalendarUtil.isSameDate(last, date) || (first.before(date) && last.after(date)))); }
/** * Is the date currently shown in the date picker? * * @param date * * @return is the date currently shown */ public boolean isDateVisible(Date date) { CalendarView r = getView(); Date first = r.getFirstDate(); Date last = r.getLastDate(); return (date != null && (CalendarUtil.isSameDate(first, date) || CalendarUtil.isSameDate(last, date) || (first.before(date) && last.after(date)))); }
/** * Adds a show range handler and immediately activate the handler on the * current view. * * @param handler the handler * @return the handler registration */ public HandlerRegistration addShowRangeHandlerAndFire( ShowRangeHandler<Date> handler) { ShowRangeEvent<Date> event = new ShowRangeEvent<Date>( getView().getFirstDate(), getView().getLastDate()) { }; handler.onShowRange(event); return addShowRangeHandler(handler); }
/** * Adds a show range handler and immediately activate the handler on the * current view. * * @param handler the handler * @return the handler registration */ public HandlerRegistration addShowRangeHandlerAndFire( ShowRangeHandler<Date> handler) { ShowRangeEvent<Date> event = new ShowRangeEvent<Date>( getView().getFirstDate(), getView().getLastDate()) { }; handler.onShowRange(event); return addShowRangeHandler(handler); }