TimePicker Blazor API

TimePicker Properties

NameTypeDefaultDescription
AutoSwitchToMinutesboolfalseSets or gets whether after selecting hours, the element will automatically switch to minute selection.
DisabledboolfalseEnables or disables the element.
FooterboolfalseDetermines whether the footer section of the element is visible or not.
FooterTemplateobjectN/ASets or gets the footer template. The value of this property can be the id of an HTMLTemplateElement or the HTMLTemplateElement itself. If set to null, a default, empty, template is applied.
FormatTimePickerFormatTimePickerFormat.12HourDetermines the hour selection format.
Localestring"en"Sets or gets the language. Used in conjunction with the property messages.
MessagesobjectN/ASets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property language.
MinuteIntervalint1Sets or gets the step when selecting minutes.
Namestring""Sets or gets the name attribute for the element. Name is used when submiting HTML forms.
ReadonlyboolfalseDisables user interaction with the element.
RightToLeftboolfalseSets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
SelectionTimePickerSelectionTimePickerSelection.HourDetermines the view that is currently being shown. By default the hours view is visible.
Themestring""Determines the theme. Theme defines the look of the element
UnfocusableboolfalseIf is set to true, the element cannot be focused.
Valueobjectnew Date()Sets or gets the value of the element. The value can be a valid Date object or a string representing a valid time.
ViewViewLayoutViewLayout.PortraitDetermines whether the element is in landscape or portrait mode.

TimePicker Methods

NameTypeArgumentsDescription
GetValueAsync()Task<object>'N/A'Gets the &quot;Value&quot; property as Task&lt;object&gt;.
Refreshvoid'N/A'Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements.
Rendervoid'N/A'Re-renders the Blazor Component. This method will make a full re-render.
SetHoursvoidint hoursSets the hours.Args: int hours - The hours to set.
SetMinutesvoidint minutesSets the minutes.Args: int minutes - The minutes to set.
StateHasChangedvoid'N/A'Refreshes the state and Re-renders the Blazor Component, if necessary.

TimePicker Events

NameTypeDescriptionEvent Detail
OnChangeEventCallback<Event>This event is triggered when the value is changed.dynamic oldValue- The old value before it was changed presented as a Date object., dynamic value- The new value presented as a Date object.
Changedevent TimePickerChangedEventHandlerThis event is triggered when the value is changed.TimePickerChangedEventArgs

Enums

TimePickerFormat

TimePickerFormat.TwelveHour
TimePickerFormat.Two4Hour

TimePickerSelection

TimePickerSelection.Hour
TimePickerSelection.Minute

ViewLayout

ViewLayout.Landscape
ViewLayout.Portrait