RayCraftDocs
v1.0.3 raycraft.dev
On this page

DateTimeRangePicker

Free

Period with start and end, picked on one calendar that shows two months side by side (Months) (first click sets the start, second sets the end) and typed or adjusted per field. The value is a DateTimeRange. Set IncludeTime to false for dates only. A date typed without a time keeps the time already chosen. Times use the same field as TimePicker.

Example

DateTimeRangePicker control

Parameters

ParameterTypeDescription
ClassstringExtra CSS classes added to the root element.
DisabledboolDisables interaction.
DisplayNamestringName used in validation messages.
HelperTextstringHint shown below the field.
IncludeTimeboolAlso picks the time of day (default true). Set false for dates only.
LabelstringVisible label text (charts: accessible name; IconButton: accessible name and tooltip).
MaxDateDateTime?Latest selectable date.
MinDateDateTime?Earliest selectable date.
MonthsintHow many months the popup shows side by side (default 2). They stack on narrow screens.
PresetsIEnumerable<DateRangePreset>Your own quick ranges: DateRangePreset(label, start, end).
ReadOnlyboolShows the value but does not allow changes.
ShowPresetsboolShows a list of quick ranges (today, last 7 days, this month...) next to the calendar.
StylestringInline style added to the root element.
ValueDateTimeRangeCurrent value. Use with @bind-Value.

Events

EventTypeDescription
ValueChangedEventCallback<DateTimeRange>Raised when the value changes.

Package

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