Class CalendarView

All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsRenderable, IsWidget
Direct Known Subclasses:
DefaultCalendarView

public abstract class CalendarView extends DatePickerComponent
The CalendarView is a calendar grid that represents the current view of a DatePicker. Note, the calendar view only deals with the currently visible dates and all state is flushed when the calendar view is refreshed.
  • Constructor Details

    • CalendarView

      public CalendarView()
      Constructor.
  • Method Details

    • addStyleToDate

      public abstract void addStyleToDate(String styleName, Date date)
      Adds a style name to the cell of the supplied date. This style is only set until the next time the CalendarView is refreshed.
      Parameters:
      styleName - style name to add
      date - date that will have the supplied style added
    • getFirstDate

      public abstract Date getFirstDate()
      Returns the first date that is currently shown by the calendar.
      Returns:
      the first date.
    • getLastDate

      public abstract Date getLastDate()
      Returns the last date that is currently shown by the calendar.
      Returns:
      the last date.
    • isDateEnabled

      public abstract boolean isDateEnabled(Date date)
      Is the cell representing the given date enabled?
      Parameters:
      date - the date
      Returns:
      is the date enabled
    • removeStyleFromDate

      public abstract void removeStyleFromDate(String styleName, Date date)
      Removes a visible style name from the cell of the supplied date.
      Parameters:
      styleName - style name to remove
      date - date that will have the supplied style added
    • setAriaSelectedCell

      public void setAriaSelectedCell(Date date)
      Sets aria-selected in the given date's cell and clears the other cells.
      Parameters:
      date - the date of the cell where aria-selected should be set, or null to clear aria-selected.
    • setEnabledOnDate

      public abstract void setEnabledOnDate(boolean enabled, Date date)
      Enables or Disables a particular date. by default all valid dates are enabled after a rendering event. Disabled dates cannot be selected.
      Parameters:
      enabled - true for enabled, false for disabled
      date - date to enable or disable
    • setHighlightedDate

      protected final void setHighlightedDate(Date date)
      Allows the calendar view to update the date picker's highlighted date.
      Parameters:
      date - the highlighted date