Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

Views

Show a month, a week or a list, and the person switches between them with the buttons.

A month of events
Events past the first few in a day collapse into a +more link. All-day and multi-day events draw as bars, timed ones as a dot and a time.
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
Show code
<app-calendar label="Team calendar" events="@events" date="2026-10-04" />
A week on a time axis
Seven days of hours, scrolling inside the calendar; on a phone it scrolls sideways rather than squeezing the days.
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
Show code
<app-calendar label="Team week" events="@events" view="AppCalendarView.Week" date="2026-10-05" />
A list, the phone view
One month as a list of days with their events: the view a calendar opens on in a narrow box.
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
Show code
<app-calendar label="Team agenda" events="@events" view="AppCalendarView.List" date="2026-10-04" />

Stacked events

An event with a stack shows one card for several events, with a +count link to the full list.

Nine releases on one day
The +9 link goes to the list of that day's releases; the card's own click opens its event.
  • Web release
Show code
<app-calendar label="Releases" events="@releases" view="AppCalendarView.Month" date="2026-10-04" />

Events and endpoints

Events come from a list or an endpoint, and a click gets the event back exactly as you gave it.

Events from an endpoint
events-url is called with start, end and view (month, week, day or list) query parameters, IST YYYY-MM-DD days where end is the first day not shown, each time the visible period or the view changes, and answers a JSON list of events. A failed request shows a message with Try again. In the code, /api/leave is your own endpoint; the stage below reads a static sample file instead.
Show code
<app-calendar label="Team leave" events-url="/api/leave" />

// Your endpoint: GET /api/leave?start=2026-09-28&end=2026-11-02&view=month
// [{ "id": "7", "title": "Asha: leave", "start": "2026-10-12", "end": "2026-10-15", "allDay": true, "tone": "info" }]
Clicks on events and days
wui-calendar:event-click carries the event exactly as you gave it, extra keys included. An event with a url is a link; call preventDefault on the event to handle it yourself. wui-calendar:date-click carries the day, and the time of day for a click on a time slot.
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review

Click an event, or a day.

Show code
calendar.addEventListener('wui-calendar:event-click', (e) => openMeeting(e.detail.id));
calendar.addEventListener('wui-calendar:date-click', (e) => startBooking(e.detail.date));

Every option

Every value of every prop, one cell each.

label

label="Calendar" (default)
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
label="Team calendar"
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review

events

events="@team"
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
events="@none"

eventsUrl

events-url="/samples/calendar-events.json"

view

view="month"
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
view="week"
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
view="day"
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
view="list"
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review

date

date="2026-10-05"
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review

emptyText

empty-text="No leave booked"

errorText

error-text: shown only when events-url fails
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review

firstDay

first-day="0"
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
first-day="1" (default)
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
first-day="2"
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
first-day="3"
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
first-day="4"
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
first-day="5"
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
first-day="6"
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review

onEventClick

wui-calendar:event-click: an event was clicked (onEventClick in React)
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review

onDateClick

wui-calendar:date-click: a day was clicked (onDateClick in React)
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review

onRangeChange

wui-calendar:range-change: the view or period changed (onRangeChange in React)
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review

className

class: extra classes on the element (className in React)
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review

timeZone

time-zone="Asia/Kolkata" (default)
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
time-zone="America/New_York"
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review

style

style: an inline style on the element
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review

Guidance

What to do, and what to avoid.

Use it when

  • Meetings, leave, releases, deadlines or bookings that people read by the day, week or month.
  • A schedule fed by an endpoint, where each period is fetched as the person moves to it.
  • One place to click a day to start something, or an event to open it.

Reach for something else when

  • Picking a date in a form. → AppDatePicker
  • A history of what happened, newest first. → AppTimeline
  • A number per day, shaded by size. → AppChart

Reference

Try every prop, read the full list, and check keyboard and screen reader behaviour.

Team calendar (Oct 2026) Empty
(none) /samples/calendar-events.json
month week day list
(theme) 0 1 2 3 4 5 6
Asia/Kolkata UTC Europe/London America/New_York Asia/Singapore
  • Quarter close
  • Gandhi Jayanti
  • Sprint planning
  • Standup
  • Design review
  • Client workshop
  • Team offsite
  • Production release
  • Training day
  • Payroll cut-off
  • Cancelled: Lead follow-up call
  • Partner onboarding review
React, generated from the controls
<AppCalendar
  label="Team calendar"
  events={events}
  view="month"
  date="2026-10-04"
  onEventClick={(event) => …}
  onDateClick={({ date }) => …}
/>
Razor, the same props
<app-calendar label="Team calendar" events="@events" view="Month" date="2026-10-04" />

9 props. The 5 most used come first.

Used on most screens 5 props

PropTypeDefaultDescription
labeldefault Calendar string Calendar The name a screen reader hears for the calendar.
eventsdefault - IEnumerable<object> - The events, instead of events-url: objects or dictionaries. Property names become camelCase keys, so a Title property is the key title. Extra keys come back in the click event.
events-urldefault - string - Called with start, end and view (month, week, day or list; IST days) whenever the visible period changes; answers a JSON list of events.
viewdefault - month | week | day | list - The view to show. Without it a calendar opens on the month, or on the list when it is narrower than a phone.
datedefault today string today The day (YYYY-MM-DD, in the time zone of the calendar) to show; today when omitted. Changing it moves the calendar.

Less common 4 props

PropTypeDefaultDescription
time-zonedefault - string - IANA time zone the calendar shows, for example Asia/Kolkata or America/New_York. Events with an offset or a Z are moved into it; events with no offset are read as already in it. Unset, it is India Standard Time (Asia/Kolkata).
empty-textdefault - string - What a list with no events says.
error-textdefault - string - What is said when events-url could not be loaded, and when the calendar's code could not.
first-daydefault theme (1) 0 | 1 | 2 | 3 | 4 | 5 | 6 theme (1) First weekday of the calendar, 0 Sunday to 6 Saturday. Unset, it follows the theme's --wui-first-day token, which is 1 (Monday) unless the product sets it.

Screen reader

3 notes
  • Every day can be reached by keyboard: one tab stop among the days, the arrow keys move between them, Home and End go to the first and last day of the week, Page Up and Page Down to the previous and next month, and Enter opens the day.
  • Events are buttons of their own: Tab to one and press Enter.
  • The label is the name a screen reader hears for the calendar.