RayCraftDocs
v1.0.3 raycraft.dev
On this page

Calendar

Free

Month grid used by DatePicker and DateTimeRangePicker. Use it on its own for inline date selection. It can mark a single value or a range, show one or more months side by side (MonthCount), and follows the current RayCraft language. Keyboard: arrow keys move by day and week, PageUp and PageDown by month (with Shift by year), Home and End to the start and end of the week, Enter picks the day.

Example

Calendar control

Parameters

ParameterTypeDescription
ClassstringExtra CSS classes added to the root element.
DayTitleFunc<DateTime, string>Returns a hint for a day, shown on hover.
HighlightWeekendsboolShows Saturdays and Sundays in a muted color.
InitialMonthDateTime?Month shown when the calendar opens.
IsDayDisabledFunc<DateTime, bool>Returns true for days that cannot be picked.
MarkedDaysIEnumerable<DateTime>Days that get a dot, for example days with events.
MaxDateDateTime?Latest selectable date.
MinDateDateTime?Earliest selectable date.
MonthCountintHow many consecutive months are shown side by side (default 1).
RangeEndDateTime?Last day of the highlighted range.
RangeStartDateTime?First day of the highlighted range.
StylestringInline style added to the root element.
ValueDateTime?Current value. Use with @bind-Value.

Events

EventTypeDescription
OnPickEventCallback<DateTime>Raised with the day that was clicked.

Package

Calendar is part of RayCraft Free. Package: RayCraft.Blazor. It comes from nuget.org. See Getting started.