Skip to content

Calendar

A calendar for selecting one date, multiple dates, or an inclusive date range.

Static SSR: Calendar and DatePicker work without a circuit and dispatch cancelable change events. Browser compositions can call setStaticCalendarDate and setStaticDatePickerValue; pass emit: false when mirroring values to avoid loops, as demonstrated by the synchronized controls on the static showcase.
December 2026

Range Calendar

December 2026
January 2027

Multiple Picker Calendar

December 2026
January 2027
February 2027
March 2027

Date Picker

Static SSR behavior

Calendar enhances single, multiple, and range selection in the browser without a Blazor circuit. Arrow keys move by day/week, Home/End move to week boundaries, PageUp/PageDown change month, and the navigation buttons and caption selects rebuild the existing Gregorian grid in place.

Before committing a selection, Calendar dispatches the bubbling, cancelable shardui:calendar-change event. Its detail includes mode, selectedDate, selectedDates, rangeStart, and rangeEnd. Cancel it to preserve the previous browser state.

Static DatePicker supports the single-date contract. Give it Name to emit a native hidden form value and optionally Form for an external form owner. Accepted selection dispatches shardui:date-picker-change, updates the display and hidden value, closes the popup, and restores focus. That event is also cancelable.

.NET callbacks do not run after the static response. Calendar browser month regeneration is limited to Gregorian cultures; for a non-Gregorian culture the shipped month remains selectable but browser navigation controls are disabled. DatePicker multiple/range modes remain outside its static field contract.

document.addEventListener("shardui:calendar-change", event => {
  console.log(event.detail.mode, event.detail.selectedDate);
});

<DatePicker Name="arrival" Form="trip-form" @bind-Value="Arrival" />
An unhandled error has occurred. Reload 🗙

    Rejoining the server...

    Rejoin failed... trying again in seconds.

    Failed to rejoin.
    Please retry or reload the page.

    The session has been paused by the server.

    Failed to resume the session.
    Please reload the page.