Forms
TwDateTimeRangePicker
TwDateTimeRangePicker is a Blazor component for choosing a start and end date and time from one popover. Bind Value, set MinDate, MaxDate and Format.
Last updated
Basic DateTime Range Picker
Bind
SelectedRange for a KeyValuePair<DateTime?, DateTime?> value (Key = start, Value = end). Unlike TwDateRangePicker's two-month popover, this shows one month plus a time editor at a time: pick the start date and time first, then the panel automatically moves on to the end - small enough to comfortably use on a phone. Shares its theme (TwDatePickerTheme) with TwDatePicker and TwDateRangePicker.@bind-SelectedRange: - - -
12-Hour Format
Set
Is12HourFormat to display and edit the time with an AM/PM toggle instead of 24-hour time.Min and Max Date
Use the
MinDate and MaxDate properties to restrict the selectable range. While picking the end date, days before the already-picked start are disabled too, so the end can never land before it.Input Variants
The datetime range picker supports the same visual variants as the other text inputs.
Dense DateTime Range Picker
Set
Dense for a more compact input with a smaller height and text size. Every single-line input shares the same dense height, so they line up when used side by side.Disabled and Readonly DateTime Range Picker
Use the
Disabled and ReadOnly properties to restrict interaction with the datetime range picker.Theme Configuration
Styling is controlled by
TwBlazorTheme.Components (a TwDatePickerTheme), configured via the
AddTwBlazor() options callback described on the Get Started page.
Every property is a set of Tailwind classes, so changes are picked up by your own Tailwind build.
| Property | Type | Controls |
|---|---|---|
Header |
string | |
WeekdaysHeader |
string | |
Base |
string | |
ActiveClass |
string | |
ButtonClass |
string | |
RangeClass |
string | |
RangeMonthCaptionClass |
string | |
PrevMonthClass |
string | |
DefaultFormat |
string | |
DefaultDateTimeFormat |
string | |
DefaultDateTimeFormat12Hour |
string | |
DefaultRangeSeparator |
string | |
IconTriggerWrapper |
string | |
IconGlyph |
string | |
TextfieldPadding |
string | |
NativeInputAppearance |
string | |
PanelWidth |
string | |
HeaderControls |
string | |
Body |
string | |
YearsGrid |
string | |
MonthsGrid |
string | |
DualMonthLayout |
string | |
DualMonthColumn |
string | |
DayGrid |
string | |
DayHeaderCellPadding |
string | |
DayAbbreviation |
string | |
RangeStageTabsContainer |
string | |
RangeStageTabInactive |
string | |
PanelMaxHeight |
string | |
PanelMaxWidth |
string | |
DualMonthPanelWidth |
string | |
StageTabBase |
string | |
HeaderNavButton |
string |
Full reference: TwDatePickerTheme on the API docs.