# Class Calendar

java.lang.Object
com.codename1.ui.Component
com.codename1.ui.Container
com.codename1.ui.Calendar

All Implemented Interfaces:
  `Animation, Editable, ActionSource, StyleListener, Iterable<Component>`

public class Calendar extends Container implements ActionSource

Date widget for selecting a date/time value.

To localize strings for month names use the values "Calendar.Month" using the 3 first characters of the month name in the resource localization e.g. "`Calendar.Jan`", "`Calendar.Feb`" etc...

To localize strings for day names use the values "Calendar.Day" in the resource localization e.g. "`Calendar.Sunday`", "`Calendar.Monday`" etc...

Note that we recommend using the `com.codename1.ui.spinner.Picker` class which is superior when running on the device for most use cases.

    Form hi = new Form("Calendar", new BorderLayout());
    Calendar cld = new Calendar();
    cld.addActionListener((e) -> Log.p("You picked: " + new Date(cld.getSelectedDay())));
    hi.add(BorderLayout.CENTER, cld);

- ## Field Summary

  ### Fields inherited from class Component

  `BASELINE, BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, CROSSHAIR_CURSOR, DEFAULT_CURSOR, DRAG_REGION_IMMEDIATELY_DRAG_X, DRAG_REGION_IMMEDIATELY_DRAG_XY, DRAG_REGION_IMMEDIATELY_DRAG_Y, DRAG_REGION_LIKELY_DRAG_X, DRAG_REGION_LIKELY_DRAG_XY, DRAG_REGION_LIKELY_DRAG_Y, DRAG_REGION_NOT_DRAGGABLE, DRAG_REGION_POSSIBLE_DRAG_X, DRAG_REGION_POSSIBLE_DRAG_XY, DRAG_REGION_POSSIBLE_DRAG_Y, E_RESIZE_CURSOR, HAND_CURSOR, LEFT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NW_RESIZE_CURSOR, RIGHT, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, TOP, W_RESIZE_CURSOR, WAIT_CURSOR`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Calendar()`
  Constructs a calendar with the current date and time
  `Calendar(long time)`
  Creates a new instance of Calendar set to the given date based on time since epoch (the Date convention)
  `Calendar(long time, TimeZone tmz)`
  Creates a new instance of Calendar set to the given date based on time since epoch (the Date convention)
  `Calendar(long time, TimeZone tmz, Image leftArrowImage, Image rightArrowImage)`
  Creates a new instance of Calendar set to the given date based on time since epoch (the Date convention)
  `Calendar(Image leftArrowImage, Image rightArrowImage)`
  Constructs a calendar with the current date and time with left and right images set

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addActionListener(ActionListener l)`
  Fires when a change is made to the month view of this component
  `void`
  `addDataChangedListener(DataChangedListener l)`
  Allows tracking selection changes in the calendar in real time
  `void`
  `addDataChangeListener(DataChangedListener l)`
  Allows tracking selection changes in the calendar in real time
  `void`
  `addDayActionListener(ActionListener l)`
  Adds an ActionListener to the day buttons.
  `void`
  `addMonthChangedListener(ActionListener l)`
  Fires when a new month is selected
  `protected void`
  `bindDayListener(Component cmp, ActionListener l)`
  Since a day may be any component type, developers should override this method to add support for binding the click listener to the given component.
  `protected Button`
  `createDay()`
  This method creates the Day Button Component for the Month View
  `protected Component`
  `createDayComponent()`
  Creates a day within the Calendar, this method is protected allowing Calendar to be subclassed to replace the rendering logic of individual day buttons.
  `protected Label`
  `createDayTitle(int day)`
  This method creates the Day title Component for the Month View
  `Date`
  `getCurrentDate()`
  Returns the currently viewed date (as opposed to the selected date)
  `Date`
  `getDate()`
  Return the date object matching the current selection
  `protected String`
  `getDayText(Component cmp)`
  Since a day may be any component type, developers should override this method to add support for removing the click listener from the given component.
  `Style`
  `getMonthViewSelectedStyle()`
  Gets the selected style of the month view component within the calendar
  `Style`
  `getMonthViewUnSelectedStyle()`
  Gets the un selected style of the month view component within the calendar
  `long`
  `getSelectedDay()`
  Returns the time for the current calendar.
  `Collection<Date>`
  `getSelectedDays()`
  Gets the dates selected on the calendar or null if no date is selected
  `String`
  `getSelectedDaysUIID()`

  ###### Returns

  `TimeZone`
  `getTimeZone()`
  Gets the Calendar timezone
  `void`
  `highlightDate(Date date, String uiid)`
  Highlights a date on the calendar using the supplied uiid.
  `void`
  `highlightDates(Collection<Date> dates, String uiid)`
  Highlights dates on the calendar using the supplied uiid.
  `boolean`
  `isChangesSelectedDateEnabled()`
  This flag determines if selected date can be changed by selecting an alternative date
  `boolean`
  `isMultipleSelectionEnabled()`
  If true multiple days can be selected on a calendar and "`getSelectedDays()`" will return the dates selected
  `boolean`
  `isTwoDigitMode()`
  When set to true days will be rendered as 2 digits with 0 preceding single digit days
  `void`
  `removeActionListener(ActionListener l)`
  Fires when a change is made to the month view of this component
  `void`
  `removeDataChangedListener(DataChangedListener l)`
  Allows tracking selection changes in the calendar in real time
  `void`
  `removeDataChangeListener(DataChangedListener l)`
  Allows tracking selection changes in the calendar in real time
  `void`
  `removeDayActionListener(ActionListener l)`
  Removes ActionListener from day buttons
  `void`
  `removeMonthChangedListener(ActionListener l)`
  Fires when a new month is selected
  `void`
  `setChangesSelectedDateEnabled(boolean changesSelectedDateEnabled)`
  This flag determines if selected date can be changed by selecting an alternative date
  `void`
  `setCurrentDate(Date d)`
  Sets the Calendar view on the given date, only the the month and year are being considered.
  `void`
  `setDate(Date d)`
  Sets the current date in the view and the selected date to be the same.
  `protected void`
  `setDayEnabled(Component cmp, boolean enable)`
  Since a day may be any component type, developers should override this method to add support for enabling or disabling the right component.
  `protected void`
  `setDayText(Component cmp, String text)`
  Since a day may be any component type, developers should override this method to add support for setting the displayed string.
  `protected void`
  `setDayUIID(Component cmp, String uiid)`
  Since a day may be any component type, developers should override this method to add support for setting the right component's UIID.
  `void`
  `setMonthViewSelectedStyle(Style s)`
  Sets the selected style of the month view component within the calendar
  `void`
  `setMonthViewUnSelectedStyle(Style s)`
  Sets the un selected style of the month view component within the calendar
  `void`
  `setMultipleSelectionEnabled(boolean multipleSelectionEnabled)`
  When set to true multiple days can be selected on a calendar and "`getSelectedDays()`" will return the dates selected
  `void`
  `setSelectedDate(Date d)`
  This method sets the Calendar selected day
  `void`
  `setSelectedDays(Collection<Date> selectedDays)`
  Sets the dates to be selected on the calendar
  `void`
  `setSelectedDays(Collection<Date> selectedDays, String uiid)`
  Sets the dates to be selected on the calendar with a custom uiid.
  `void`
  `setSelectedDaysUIID(String uiid)`
  Sets the selectedDays UIID to the given uiid.
  `void`
  `setTimeZone(TimeZone tmz)`
  Sets the Calendar timezone, if not specified Calendar will use the default timezone
  `void`
  `setTwoDigitMode(boolean twoDigitMode)`
  When set to true days will be rendered as 2 digits with 0 preceding single digit days
  `void`
  `setYearRange(int minYear, int maxYear)`
  Sets the Calendar min and max years
  `void`
  `unHighlightDate(Date date)`
  Un-highlights dates on the calendar by removing the highlighting uiid.
  `void`
  `unHighlightDates(Collection<Date> dates)`
  Un-highlights dates on the calendar by removing the highlighting uiid.
  `protected void`
  `updateButtonDayDate(Button dayButton, int currentMonth, int day)`
  This method updates the Button day.
  `protected void`
  `updateButtonDayDate(Button dayButton, int year, int currentMonth, int day)`
  This method updates the Button day.
  `protected void`
  `updateButtonDayDate(Component dayButton, int currentMonth, int day)`
  This method updates the Button day.
  `protected void`
  `updateButtonDayDate(Component dayButton, int year, int currentMonth, int day)`
  This method updates the Button day.

  ### Methods inherited from class Container

  `add, add, add, add, add, add, addAll, addComponent, addComponent, addComponent, addComponent, animateHierarchy, animateHierarchyAndWait, animateHierarchyFade, animateHierarchyFadeAndWait, animateLayout, animateLayoutAndWait, animateLayoutFade, animateLayoutFadeAndWait, animateUnlayout, animateUnlayoutAndWait, applyRTL, calcPreferredSize, cancelRepaints, clearClientProperties, constrainHeightWhenScrollable, constrainWidthWhenScrollable, contains, createAnimateHierarchy, createAnimateHierarchyFade, createAnimateLayout, createAnimateLayoutFade, createAnimateLayoutFadeAndWait, createAnimateMotion, createAnimateUnlayout, createReplaceTransition, dragInitiated, drop, encloseIn, encloseIn, findDropTargetAt, findFirstFocusable, fireClicked, flushReplace, forceRevalidate, getBottomGap, getChildrenAsList, getClosestComponentTo, getComponentAt, getComponentAt, getComponentCount, getComponentIndex, getGridPosX, getGridPosY, getLayout, getLayoutHeight, getLayoutWidth, getLeadComponent, getLeadParent, getResponderAt, getSafeAreaRoot, getScrollIncrement, getSideGap, getUIManager, initLaf, invalidate, isEnabled, isSafeArea, isSafeAreaRoot, isScrollableX, isScrollableY, isSelectableInteraction, isSurface, iterator, iterator, keyPressed, keyReleased, layoutContainer, morph, morphAndWait, paint, paintComponentBackground, paintGlass, paramString, pointerPressed, refreshTheme, removeAll, removeComponent, replace, replace, replaceAndWait, replaceAndWait, replaceAndWait, revalidate, revalidateLater, revalidateWithAnimationSafety, scrollComponentToVisible, setCellRenderer, setEnabled, setLayout, setLeadComponent, setSafeArea, setSafeAreaRoot, setScrollable, setScrollableX, setScrollableY, setScrollIncrement, setShouldCalcPreferredSize, setShouldLayout, setUIManager, updateTabIndices`

  ### Methods inherited from class Component

  `addDragFinishedListener, addDragOverListener, addDropListener, addFocusListener, addLongPressListener, addPointerDraggedListener, addPointerPressedListener, addPointerReleasedListener, addPullToRefresh, addScrollListener, addStateChangeListener, animate, announceForAccessibility, bindProperty, blocksSideSwipe, calcScrollSize, contains, containsOrOwns, createStyleAnimation, deinitialize, deinitializeCustomStyle, dragEnter, dragExit, dragFinished, draggingOver, drawDraggedImage, focusGained, focusLost, getAbsoluteX, getAbsoluteY, getAccessibilityText, getAllStyles, getAnimationManager, getBaseline, getBaselineResizeBehavior, getBindablePropertyNames, getBindablePropertyTypes, getBorder, getBoundPropertyValue, getBounds, getBounds, getClientProperty, getCloudBoundProperty, getCloudDestinationProperty, getComponentForm, getComponentState, getCursor, getDefaultDragTransparency, getDirtyRegion, getDisabledStyle, getDraggedx, getDraggedy, getDragImage, getDragRegionStatus, getDragSpeed, getDragTransparency, getEditingDelegate, getHeight, getInlineAllStyles, getInlineDisabledStyles, getInlinePressedStyles, getInlineSelectedStyles, getInlineStylesTheme, getInlineUnselectedStyles, getInnerHeight, getInnerPreferredH, getInnerPreferredW, getInnerWidth, getInnerX, getInnerY, getLabelForComponent, getName, getNativeOverlay, getNextFocusDown, getNextFocusLeft, getNextFocusRight, getNextFocusUp, getOuterHeight, getOuterPreferredH, getOuterPreferredW, getOuterWidth, getOuterX, getOuterY, getOwner, getParent, getPreferredH, getPreferredSize, getPreferredSizeStr, getPreferredTabIndex, getPreferredW, getPressedStyle, getPropertyNames, getPropertyTypeNames, getPropertyTypes, getPropertyValue, getSameHeight, getSameWidth, getScrollable, getScrollAnimationSpeed, getScrollDimension, getScrollOpacity, getScrollOpacityChangeSpeed, getScrollX, getScrollY, getSelectCommandText, getSelectedRect, getSelectedStyle, getStyle, getTabIndex, getTensileLength, getTextSelectionSupport, getTooltip, getUIID, getUnselectedStyle, getVisibleBounds, getVisibleBounds, getWidth, getX, getY, growShrink, handlesInput, hasFixedPreferredSize, hasFocus, hideNativeOverlay, initComponent, initCustomStyle, initDisabledStyle, initPressedStyle, initSelectedStyle, initUnselectedStyle, installDefaultPainter, isAlwaysTensile, isBlockLead, isCellRenderer, isChildOf, isDragActivated, isDragAndDropOperation, isDraggable, isDragRegion, isDropTarget, isEditable, isEditing, isFlatten, isFocusable, isGrabsPointerEvents, isHidden, isHidden, isHideInLandscape, isHideInPortrait, isIgnorePointerEvents, isInClippingRegion, isInitialized, isOpaque, isOwnedBy, isPinchBlocksDragAndDrop, isRippleEffect, isRTL, isScrollable, isScrollVisible, isSetCursorSupported, isSmoothScrolling, isSnapToGrid, isStickyDrag, isTactileTouch, isTactileTouch, isTensileDragEnabled, isTraversable, isVisible, keyRepeated, laidOut, longKeyPress, longPointerPress, onScrollX, onScrollY, onSetFocusable, paintBackground, paintBackgrounds, paintBorder, paintBorderBackground, paintComponent, paintComponent, paintIntersectingComponentsAbove, paintLock, paintLockRelease, paintRippleOverlay, paintScrollbars, paintScrollbarX, paintScrollbarY, paintShadows, parsePreferredSize, pinch, pinch, pinchReleased, pointerDragged, pointerDragged, pointerHover, pointerHoverPressed, pointerHoverReleased, pointerPressed, pointerReleased, pointerReleased, putClientProperty, refreshTheme, refreshTheme, remove, removeDragFinishedListener, removeDragOverListener, removeDropListener, removeFocusListener, removeLongPressListener, removePointerDraggedListener, removePointerPressedListener, removePointerReleasedListener, removeScrollListener, removeStateChangeListener, repaint, repaint, requestFocus, resetFocusable, respondsToPointerEvents, scrollRectToVisible, scrollRectToVisible, setAccessibilityText, setAlwaysTensile, setBlockLead, setBoundPropertyValue, setCloudBoundProperty, setCloudDestinationProperty, setComponentState, setCursor, setDefaultDragTransparency, setDirtyRegion, setDisabledStyle, setDraggable, setDragTransparency, setDropTarget, setEditingDelegate, setFlatten, setFocus, setFocusable, setGrabsPointerEvents, setHandlesInput, setHeight, setHidden, setHidden, setHideInLandscape, setHideInPortrait, setIgnorePointerEvents, setInitialized, setInlineAllStyles, setInlineDisabledStyles, setInlinePressedStyles, setInlineSelectedStyles, setInlineStylesTheme, setInlineUnselectedStyles, setIsScrollVisible, setLabelForComponent, setName, setNextFocusDown, setNextFocusLeft, setNextFocusRight, setNextFocusUp, setOpaque, setOwner, setPinchBlocksDragAndDrop, setPreferredH, setPreferredSize, setPreferredSizeStr, setPreferredTabIndex, setPreferredW, setPressedStyle, setPropertyValue, setRippleEffect, setRTL, setSameHeight, setSameSize, setSameWidth, setScrollAnimationSpeed, setScrollOpacityChangeSpeed, setScrollSize, setScrollVisible, setScrollX, setScrollY, setSelectCommandText, setSelectedStyle, setSize, setSmoothScrolling, setSnapToGrid, setTabIndex, setTactileTouch, setTensileDragEnabled, setTensileLength, setTooltip, setTraversable, setUIID, setUIID, setUIIDFinal, setUnselectedStyle, setVisible, setWidth, setX, setY, shouldBlockSideSwipe, shouldBlockSideSwipeLeft, shouldBlockSideSwipeRight, shouldRenderComponentSelection, showNativeOverlay, startEditingAsync, stopEditing, stripMarginAndPadding, styleChanged, toImage, toString, unbindProperty, updateNativeOverlay, visibleBoundsContains`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Calendar

    public Calendar(long time)

    Creates a new instance of Calendar set to the given date based on time since epoch (the Date convention)

    ###### Parameters

    - `time`: time since epoch

  - ### Calendar

    public Calendar()
    Constructs a calendar with the current date and time

  - ### Calendar

    public Calendar(long time, TimeZone tmz)

    Creates a new instance of Calendar set to the given date based on time since epoch (the Date convention)

    ###### Parameters

    - `time`: time since epoch

    - `tmz`: a reference timezone

  - ### Calendar

    public Calendar(Image leftArrowImage, Image rightArrowImage)

    Constructs a calendar with the current date and time with left and right images set

    ###### Parameters

    - `leftArrowImage`: an image for calendar left arrow

    - `rightArrowImage`: an image for calendar right arrow

  - ### Calendar

    public Calendar(long time, TimeZone tmz, Image leftArrowImage, Image rightArrowImage)

    Creates a new instance of Calendar set to the given date based on time since epoch (the Date convention)

    ###### Parameters

    - `time`: time since epoch

    - `tmz`: a reference timezone

    - `leftArrowImage`: an image for calendar left arrow

    - `rightArrowImage`: an image for calendar right arrow

- ## Method Details

  - ### getSelectedDay

    public long getSelectedDay()

    Returns the time for the current calendar.

    ###### Returns

    the time for the current calendar.

  - ### getDate

    public Date getDate()

    Return the date object matching the current selection

    ###### Returns

    the date object matching the current selection

  - ### setDate

    public void setDate(Date d)

    Sets the current date in the view and the selected date to be the same.

    ###### Parameters

    - `d`: new date

  - ### setYearRange

    public void setYearRange(int minYear, int maxYear)

    Sets the Calendar min and max years

    ###### Parameters

    - `minYear`: the min year

    - `maxYear`: the max year

  - ### setSelectedDate

    public void setSelectedDate(Date d)

    This method sets the Calendar selected day

    ###### Parameters

    - `d`: the selected day

  - ### getCurrentDate

    public Date getCurrentDate()

    Returns the currently viewed date (as opposed to the selected date)

    ###### Returns

    the currently viewed date

  - ### setCurrentDate

    public void setCurrentDate(Date d)

    Sets the Calendar view on the given date, only the the month and year are being considered.

    ###### Parameters

    - `d`: the date to set the calendar view on.

  - ### getTimeZone

    public TimeZone getTimeZone()

    Gets the Calendar timezone

    ###### Returns

    Calendar TimeZone

  - ### setTimeZone

    public void setTimeZone(TimeZone tmz)

    Sets the Calendar timezone, if not specified Calendar will use the default timezone

    ###### Parameters

    - `tmz`: the timezone

  - ### getMonthViewSelectedStyle

    public Style getMonthViewSelectedStyle()

    Gets the selected style of the month view component within the calendar

    ###### Returns

    the style of the month view

  - ### setMonthViewSelectedStyle

    public void setMonthViewSelectedStyle(Style s)

    Sets the selected style of the month view component within the calendar

    ###### Parameters

    - `s`: style for the month view

  - ### getMonthViewUnSelectedStyle

    public Style getMonthViewUnSelectedStyle()

    Gets the un selected style of the month view component within the calendar

    ###### Returns

    the style of the month view

  - ### setMonthViewUnSelectedStyle

    public void setMonthViewUnSelectedStyle(Style s)

    Sets the un selected style of the month view component within the calendar

    ###### Parameters

    - `s`: style for the month view

  - ### addActionListener

    public void addActionListener(ActionListener l)

    Fires when a change is made to the month view of this component

    ###### Parameters

    - `l`: listener to add
    Specified by:
      `addActionListener` in interface `ActionSource`

  - ### removeActionListener

    public void removeActionListener(ActionListener l)

    Fires when a change is made to the month view of this component

    ###### Parameters

    - `l`: listener to remove
    Specified by:
      `removeActionListener` in interface `ActionSource`

  - ### addMonthChangedListener

    public void addMonthChangedListener(ActionListener l)

    Fires when a new month is selected

    ###### Parameters

    - `l`: listener to add

  - ### removeMonthChangedListener

    public void removeMonthChangedListener(ActionListener l)

    Fires when a new month is selected

    ###### Parameters

    - `l`: listener to remove

  - ### addDayActionListener

    public void addDayActionListener(ActionListener l)

    Adds an ActionListener to the day buttons. This is different from `Calendar.addActionListener` and will only fire when an active day is selected.

    ###### Parameters

    - `l`: listener to add

  - ### removeDayActionListener

    public void removeDayActionListener(ActionListener l)

    Removes ActionListener from day buttons

    ###### Parameters

    - `l`: listener to remove

  - ### addDataChangedListener

    public void addDataChangedListener(DataChangedListener l)

    Allows tracking selection changes in the calendar in real time

    ###### Parameters

    - `l`: listener to add

  - ### removeDataChangedListener

    public void removeDataChangedListener(DataChangedListener l)

    Allows tracking selection changes in the calendar in real time

    ###### Parameters

    - `l`: listener to remove

  - ### addDataChangeListener

    public void addDataChangeListener(DataChangedListener l)

    Allows tracking selection changes in the calendar in real time

    ###### Parameters

    - `l`: listener to add

    ###### Deprecated

    use #addDataChangedListener(DataChangedListener) instead

  - ### removeDataChangeListener

    public void removeDataChangeListener(DataChangedListener l)

    Allows tracking selection changes in the calendar in real time

    ###### Parameters

    - `l`: listener to remove

    ###### Deprecated

    use #removeDataChangedListener(DataChangedListener) instead

  - ### isChangesSelectedDateEnabled

    public boolean isChangesSelectedDateEnabled()

    This flag determines if selected date can be changed by selecting an alternative date

    ###### Returns

    true if enabled

  - ### setChangesSelectedDateEnabled

    public void setChangesSelectedDateEnabled(boolean changesSelectedDateEnabled)

    This flag determines if selected date can be changed by selecting an alternative date

    ###### Parameters

    - `changesSelectedDateEnabled`: @param changesSelectedDateEnabled if true pressing on a date will cause the selected date to be changed to the pressed one

  - ### createDay

    protected Button createDay()

    This method creates the Day Button Component for the Month View

    ###### Returns

    a Button that corresponds to the Days Components

    ###### Deprecated

    override `createDayComponent()` instead

  - ### createDayTitle

    protected Label createDayTitle(int day)

    This method creates the Day title Component for the Month View

    ###### Parameters

    - `day`: the relevant day values are 0-6 where 0 is Sunday.

    ###### Returns

    a Label that corresponds to the relevant Day

  - ### updateButtonDayDate

    protected void updateButtonDayDate(Component dayButton, int year, int currentMonth, int day)

    This method updates the Button day.

    ###### Parameters

    - `dayButton`: the button to be updated

    - `year`: the current year

    - `currentMonth`: the current month

    - `day`: the new button day

  - ### updateButtonDayDate

    protected void updateButtonDayDate(Component dayButton, int currentMonth, int day)

    This method updates the Button day.

    ###### Parameters

    - `dayButton`: the button to be updated

    - `currentMonth`: the current month

    - `day`: the new button day

  - ### updateButtonDayDate

    protected void updateButtonDayDate(Button dayButton, int year, int currentMonth, int day)

    This method updates the Button day.

    ###### Parameters

    - `dayButton`: the button to be updated

    - `year`: the current year

    - `currentMonth`: the current month

    - `day`: the new button day

    ###### Deprecated

    override the method that accepts a generic component

  - ### updateButtonDayDate

    protected void updateButtonDayDate(Button dayButton, int currentMonth, int day)

    This method updates the Button day.

    ###### Parameters

    - `dayButton`: the button to be updated

    - `currentMonth`: the current month

    - `day`: the new button day

    ###### Deprecated

    override the method that accepts a generic component

  - ### isTwoDigitMode

    public boolean isTwoDigitMode()

    When set to true days will be rendered as 2 digits with 0 preceding single digit days

    ###### Returns

    the twoDigitMode

  - ### setTwoDigitMode

    public void setTwoDigitMode(boolean twoDigitMode)

    When set to true days will be rendered as 2 digits with 0 preceding single digit days

    ###### Parameters

    - `twoDigitMode`: the twoDigitMode to set

  - ### getSelectedDays

    public Collection<Date> getSelectedDays()

    Gets the dates selected on the calendar or null if no date is selected

    ###### Returns

    the selected days

  - ### setSelectedDays

    public void setSelectedDays(Collection<Date> selectedDays)

    Sets the dates to be selected on the calendar

    ###### Parameters

    - `selectedDays`: the multipleDateSelection to set

  - ### setSelectedDays

    public void setSelectedDays(Collection<Date> selectedDays, String uiid)

    Sets the dates to be selected on the calendar with a custom uiid. To use default uiid "`CalendarMultipleDay`", call this method without the "`uiid` parameter"

    ###### Parameters

    - `selectedDays`: the multipleDateSelection to set

    - `uiid`: a custom uiid to be used in the dates selected

  - ### getSelectedDaysUIID

    public String getSelectedDaysUIID()

    ###### Returns

    selectedDays uiid

  - ### setSelectedDaysUIID

    public void setSelectedDaysUIID(String uiid)

    Sets the selectedDays UIID to the given uiid. being considered.

    ###### Parameters

    - `uiid`: the uiid to change to

  - ### highlightDate

    public void highlightDate(Date date, String uiid)

    Highlights a date on the calendar using the supplied uiid. (Selected dates uiid takes precedence over highlighted dates uiid)

    ###### Parameters

    - `date`: the date to be highlighted

    - `uiid`: a custom uiid to be used in highlighting the date

  - ### highlightDates

    public void highlightDates(Collection<Date> dates, String uiid)

    Highlights dates on the calendar using the supplied uiid. (Selected dates uiid takes precedence over highlighted dates uiid)

    ###### Parameters

    - `dates`: the dates to be highlighted

    - `uiid`: a custom uiid to be used in highlighting the dates

  - ### unHighlightDates

    public void unHighlightDates(Collection<Date> dates)

    Un-highlights dates on the calendar by removing the highlighting uiid. (`selectedDaysUIID` uiid will be applied to any of the dates that are part of `selectedDays`)

    ###### Parameters

    - `dates`: the dates to be un-highlighted

  - ### unHighlightDate

    public void unHighlightDate(Date date)

    Un-highlights dates on the calendar by removing the highlighting uiid. (`selectedDaysUIID` uiid will be applied to the date if it is part of `selectedDays`)

    ###### Parameters

    - `date`: the date to be un-highlighted

  - ### isMultipleSelectionEnabled

    public boolean isMultipleSelectionEnabled()

    If true multiple days can be selected on a calendar and "`getSelectedDays()`" will return the dates selected

    ###### Returns

    the multipleSelectionEnabled

  - ### setMultipleSelectionEnabled

    public void setMultipleSelectionEnabled(boolean multipleSelectionEnabled)

    When set to true multiple days can be selected on a calendar and "`getSelectedDays()`" will return the dates selected

    ###### Parameters

    - `multipleSelectionEnabled`: the multipleSelectionEnabled to set

  - ### createDayComponent

    protected Component createDayComponent()

    Creates a day within the Calendar, this method is protected allowing Calendar to be subclassed to replace the rendering logic of individual day buttons.

    ###### Returns

    a button representing the day within the Calendar

  - ### bindDayListener

    protected void bindDayListener(Component cmp, ActionListener l)

    Since a day may be any component type, developers should override this method to add support for binding the click listener to the given component.

    ###### Parameters

    - `l`: listener interface

    - `cmp`: day component returned by createDayComponent()

  - ### setDayText

    protected void setDayText(Component cmp, String text)

    Since a day may be any component type, developers should override this method to add support for setting the displayed string.

    ###### Parameters

    - `text`: the text set the component to

    - `cmp`: day component returned by createDayComponent()

  - ### getDayText

    protected String getDayText(Component cmp)

    Since a day may be any component type, developers should override this method to add support for removing the click listener from the given component.

    ###### Parameters

    - `cmp`: day component returned by createDayComponent

    ###### Returns

    the day text

  - ### setDayUIID

    protected void setDayUIID(Component cmp, String uiid)

    Since a day may be any component type, developers should override this method to add support for setting the right component's UIID.

    ###### Parameters

    - `cmp`: day component returned by createDayComponent()

    - `uiid`: the text set the component to

  - ### setDayEnabled

    protected void setDayEnabled(Component cmp, boolean enable)

    Since a day may be any component type, developers should override this method to add support for enabling or disabling the right component.

    ###### Parameters

    - `cmp`: day component returned by createDayComponent()

    - `enable`: the text set the component to