AutomationId

The SfCalendar control has built-in AutomationId for inner elements. Please find the following table of Automation IDs for inner elements.

View AutomationId Format Example
MonthCell dddd dd/MMMM/yyyy Tuesday 27/May/2018
Month Header - Month view MMMM yyyy May 2018
Month Header - Week view MMMM – MMMM yyyy November – December 2018
Left Arrow string Backward
Right Arrow string Forward
Inline View , Agenda View appointment Subject hh tt-hh tt dd/MMMM/yyyy Consulting 10 AM-12 PM 01/July/2019
Inline View , Agenda View All day appointment Subject All day Consulting All day
Inline View , Agenda View Spanning appointment Subject hh tt dd/MMMM/yyyy-hh tt dd/MMMM/yyyy Planning 10 AM 12/August/2019-02 PM 18/August/2019
Year View - Header yyyy 2018
Year View - Year Cell MMMM yyyy January 2018
Decade View - Header yyyy - yyyy 2020 – 2029
Decade View - Year Cell yyyy 2020
Century View - Header yyyy - yyyy 2000 – 2099
Century View - Year Cell yyyy 2070 – 2079

To keep unique AutomationId, these inner elements’ AutomationIds are updated based on the control’s AutomationId. For example, if you set SfCalendar AutomationId as SfCalendar.AutomationId = Calendar, then the Automation framework will interact with the RightArrow button as CalendarForward. The following screenshots denote the AutomationIds for inner elements.

Month view

MonthView AutomationId support in Xamarin.Forms Calendar
MonthView Spanning appointment AutomationId support in Xamarin.Forms Calendar

Week view

Week view AutomationId support in Xamarin.Forms Calendar
Week view AutomationId support in Xamarin.Forms Calendar

Year view

Year view AutomationId support in Xamarin.Forms Calendar

Decade view

Decade view AutomationId support in Xamarin.Forms Calendar

Century view

Century view AutomationId support in Xamarin.Forms Calendar

Keyboard

SfCalendar supports selection in MonthView using keyboard interactions. Keyboard interaction will not have any effect when the SelectionMode is set to SelectionMode.MultiRangeSelection.

NOTE
Keyboard interaction is applicable only for UWP platform.

Key Description
DownArrow Moves selection to the date directly below the currently selected date on next row.
UpArrow Moves selection to the date directly above the currently selected date on previous row.
RightArrow Moves the selection to the next date of the date currently selected.
LeftArrow Moves the selection to the previous date of the date currently selected.

Shift key combinations

Key combinations Description
Shift + DownArrow If the SelectionMode is Multiple, the date directly below the last selected date on the next row will be selected along with the currently selected dates. If the SelectionMode is RangeSelection and selecting dates using the keyboard, the range will be extended to the date directly below the last selected date.
Shift + UpArrow If the SelectionMode is Multiple, the date directly above the last selected date on the previous row will be selected along with the currently selected dates. If the SelectionMode is RangeSelection and selecting dates using the keyboard, the range will be extended to the date directly above the last selected date.
Shift + RightArrow If the SelectionMode is Multiple, the next date of the last selected date will be selected along with the currently selected dates. If the SelectionMode is RangeSelection and selecting dates using the keyboard, the range will be extended to the next date of the last selected date.
Shift + LeftArrow If the SelectionMode is Multiple, the previous date of the last selected date will be selected along with the currently selected dates. If the SelectionMode is RangeSelection and selecting dates using the keyboard, the range will be extended to the previous date of the last selected date.

View navigations

Key combinations Description
Ctrl + Plus View mode changes in the order of Month, Year, Decade, and Century.
Ctrl + Minus View mode changes in the order of Month, Century, Decade, and Year.