Calendar
A calendar for selecting one date, multiple dates, or an inclusive date range.
setStaticCalendarDate and setStaticDatePickerValue; pass emit: false when mirroring values to avoid loops, as demonstrated by the synchronized controls on the static showcase.
Range Calendar
Multiple Picker Calendar
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" />