Edit this page

Editing the CalendarButton Style

Most of the calendar surface is taken up by the calendar buttons and most of the user interaction involves them as well.

All the buttons in the body of the calendar are actually CalendarButtons, though they have slightly different styles for the four modes.

The CalendarButton has the following visual states:

CommonStates group:

  • Normal – The default state of the button

  • Disabled – Active when the button is not selectable (outside the SelectableStart/End range)

  • IsInAnotherView – This state is active when multiple views are present in the calendar and the given date already exists in another, more appropriate view. For example the first days of September will be visible in the month view for August, but if there is a month view for September as well, the former will be in the IsInAnotherView state.

  • IsNotFromCurrentView– This state is active for the calendar buttons in a given calendar view that do not belong to it, for example the first days of April visible in the month view for March.

ButtonType group: Suited for visual differences based on the type of the button (in which view it appears)

  • Year – Button that appears in the Decade view.

  • Decade – Button in the Century view.

  • Date– Button that appears in the month view.

  • WeekName – Button that appears in the month view and is a name of a weekday

  • WeekNumber – Button that appears in the month view and bears a week number

  • TodayDate – Button that appears in the month view and is today’s date

  • Month – Button that appears in the year view.

FocusStates group– determine whether there is keyboard focus on the control.

  • Focused

  • Unfocused

SelectionStates

  • Unselected, the default state

  • MouseOver, activated when the mouse is over the control

  • Selected, Activated when the button is selected.