On this page
@addTagHelper *, Webority.Ui.RazorSwitcher
One header for every portal calendar: the period, Previous, Next and Today, and the Agenda, Timeline and Month switcher. The page fills the body with the chosen view.
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
Every option
Every value of every prop, one cell each.
views: the views the switcher offers
views: (default), agenda, timeline and month
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
views="agenda,month": two views
November 2026
The agenda view goes here.
The month view goes here.
view: the view shown
view: (default), the address names it, else the first
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
view="Agenda"
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
view="Timeline"
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
view="Month"
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
onViewChange: a view is chosen
onViewChange: React only, a callback; Razor fires wui-calendar-views:view-change
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
period: the period shown
period="November 2026"
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
onPeriodChange: Previous, Next or Today is pressed
onPeriodChange: React only, a callback; Razor fires an event
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
label: the name a screen reader hears
label="Calendar view" (default)
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
label="Leave calendar"
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
legend: beside the switcher
legend: (default), none
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
legend: app-calendar-views-legend
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
actions: at the end of the header
actions: (default), none
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
actions: app-calendar-views-actions
The agenda view goes here.
The timeline view goes here.
The month view goes here.
className and style: the root element
class: the root's own class, the Razor form of className
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
style: React only, inline style on the root element
November 2026
The agenda view goes here.
The timeline view goes here.
The month view goes here.
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
4 props. The 4 most used come first.
Used on most screens 4 props
| Prop | Type | Default | Description |
|---|---|---|---|
| labeldefault - | string | - | The accessible name of the view switcher. |
| viewsdefault ["agenda","timeline","month"] | string? | ["agenda","timeline","month"] | The views the switcher offers, in its order. Agenda is the first and so the default. |
| viewdefault - | agenda | timeline | month | - | The view shown. Unset, the calendar opens on the #view= name in the address, else the first of views. |
| perioddefault - | string? | - | The period shown, such as "November 2026". |
Screen reader
2 notes- The view switcher is a group of radio buttons named by the label, so a screen reader hears each view name and which one is chosen.
- Previous, Next and Today are native buttons with their own names.
Do and avoid
1 pairsName the period in the header
November 2026
The period tells a person which days the view shows, so they can check it before they act.
Without a period a person cannot tell which days the view shows.