Forms
TwDateTimePicker
TwDateTimePicker is a Blazor component for choosing a date and time in one input. Bind Value, set Format and Placeholder, and use PreferNativePicker on mobile.
Last updated
Basic DateTime picker
Bind
SelectedDateTime for a DateTime value, or Value for a plain string.@bind-SelectedDate (DateTime): 11/28/2026
@bind-Value (string): 28/11/2026 22:14
Input variants
The DatePicker supports different visual variants for the input field.
Step
Set
Step to the number of minutes the time arrow buttons and the Arrow Up/Arrow Down keys move by. Under an hour, the minutes step (15 gives :00, :15, :30 and :45). From 60 upwards, the hours step instead (120 moves two hours at a time) and the minutes are shown as fixed text with no arrow buttons. The step must divide an hour (1, 2, 3, 4, 5, 6, 10, 12, 15, 20 or 30) or be a whole number of hours that divides a day (60, 120, 180, 240, 360, 480 or 720). A time typed into the field is kept as entered. When the browser's native picker is used, the step is passed on to it.Dense DateTime 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 picker
Use the
Disabled and ReadOnly properties to restrict interaction with the datetime 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 | |
SelectedClass |
string | |
HoverClass |
string | |
StageTabActive |
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.