Class SfTimePicker<TValue>
TimePicker is an intuitive component which provides an options to select a time value from popup list or to set a desired time value.
Inheritance
System.Object
Syncfusion.Blazor.SfBaseComponent
SfTimePicker<TValue>
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfTimePicker<TValue> : SfBaseComponent, IInputBase
Type Parameters
Constructors
SfTimePicker()
Declaration
Properties
AllowEdit
Specifies a boolean value whether the TimePicker allows user to change the value via typing. When set as false, the TimePicker allows user to change the value via picker only.
Declaration
public bool AllowEdit { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
CssClass
Specifies the CSS class name that can be appended with the root element of the TimePicker. One or more custom CSS classes can be added to a TimePicker.
Declaration
public string CssClass { get; set; }
Property Value
Type |
Description |
System.String |
|
Enabled
Specifies a boolean value that indicates whether the TimePicker allows the user to interact with it.
Declaration
public bool Enabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnablePersistence
Enable or disable persisting TimePicker's state between page reloads. If enabled, the Value
state will be persisted.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnableRtl
Enable or disable rendering TimePicker in right to left direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
FloatLabelType
Specifies the floating label behavior of the TimePicker that the placeholder text floats above the TimePicker based on the following values.
Possible values are:
- NeverNever floats the label in the TimePicker when the placeholder is available.
- AlwaysThe floating label always floats above the TimePicker.
- AutoThe floating label floats above the TimePicker after focusing it or when enters the value in it.
Declaration
public FloatLabelType FloatLabelType { get; set; }
Property Value
Sets or gets the required time format of value that is to be displayed in component.
By default, the format is based on the culture.
Declaration
public string Format { get; set; }
Property Value
Type |
Description |
System.String |
|
HtmlAttributes
You can add the additional html attributes such as styles, class, and more to the root element.
If you configured both the property and equivalent html attribute, then the component considers the property value.
Declaration
public Dictionary<string, object> HtmlAttributes { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
|
ID
Specifies the id of the TimePicker component.
Declaration
public string ID { get; set; }
Property Value
Type |
Description |
System.String |
|
You can add the additional html attributes such as styles, value, and more to the input element.
If you configured both the property and equivalent input attribute, then the component considers the property value.
Declaration
public Dictionary<string, object> InputAttributes { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
|
KeyConfigs
Customizes the key actions in TimePicker. For example, when using German keyboard, the key actions can be customized using these shortcuts.
Declaration
public Dictionary<string, object> KeyConfigs { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
|
Locale
Specifies the global culture and localization of the TimePicker.
Declaration
public string Locale { get; set; }
Property Value
Type |
Description |
System.String |
|
Max
Gets or sets the maximum time value that can be allowed to select in TimePicker.
Declaration
public DateTime Max { get; set; }
Property Value
Type |
Description |
System.DateTime |
|
Min
Gets or sets the minimum time value that can be allowed to select in TimePicker.
Declaration
public DateTime Min { get; set; }
Property Value
Type |
Description |
System.DateTime |
|
Placeholder
Specifies the text that is shown as a hint or placeholder until the user focuses or enter a value in TimePicker. The property is depending on the FloatLabelType property.
Declaration
public string Placeholder { get; set; }
Property Value
Type |
Description |
System.String |
|
Readonly
Specifies the boolean value whether the TimePicker allows the user to change the text.
Declaration
public bool Readonly { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Specifies the scroll bar position, if there is no value is selected in the popup list or the given value is not present in the popup list.
Declaration
public Nullable<DateTime> ScrollTo { get; set; }
Property Value
Type |
Description |
System.Nullable<System.DateTime> |
|
Specifies a boolean value that indicates whether the clear button is displayed in TimePicker.
Declaration
public bool ShowClearButton { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Step
Specifies the time interval between the two adjacent time values in the popup list.
Declaration
public int Step { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
StrictMode
Declaration
public bool StrictMode { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
TabIndex
Declaration
public int TabIndex { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
TimePickerEditContext
Declaration
protected EditContext TimePickerEditContext { get; set; }
Property Value
Type |
Description |
Microsoft.AspNetCore.Components.Forms.EditContext |
|
TimePickerParent
Declaration
protected dynamic TimePickerParent { get; set; }
Property Value
Type |
Description |
System.Object |
|
Value
Gets or sets the value of the TimePicker. The value is parsed based on the culture specific time format.
Declaration
public TValue Value { get; set; }
Property Value
ValueChanged
Specifies the callback to trigger when the value changes.
Declaration
public EventCallback<TValue> ValueChanged { get; set; }
Property Value
Type |
Description |
Microsoft.AspNetCore.Components.EventCallback<TValue> |
|
ValueExpression
Specifies the expression for defining the value of the bound.
Declaration
public Expression<Func<TValue>> ValueExpression { get; set; }
Property Value
Type |
Description |
System.Linq.Expressions.Expression<System.Func<TValue>> |
|
Width
Specifies the width of the TimePicker component.
Declaration
public string Width { get; set; }
Property Value
Type |
Description |
System.String |
|
ZIndex
specifies the z-index value of the TimePicker popup element.
Declaration
public int ZIndex { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder |
__builder |
|
FocusIn()
Sets the focus to the TimePicker component for interaction.
Declaration
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
FocusOut()
Remove the focus from the TimePicker component, if the component is in focus state.
Declaration
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
GetPersistData()
Gets the properties to be maintained in the persisted state.
Declaration
public Task<string> GetPersistData()
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String> |
|
Hide(EventArgs)
Hides the TimePicker popup.
Specifies the event arguments
Declaration
public Task Hide(EventArgs args = null)
Parameters
Type |
Name |
Description |
System.EventArgs |
args |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
OnAfterRenderAsync(Boolean)
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type |
Name |
Description |
System.Boolean |
firstRender |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
Syncfusion.Blazor.SfBaseComponent.OnAfterRenderAsync(System.Boolean)
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
Syncfusion.Blazor.SfBaseComponent.OnInitializedAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Show(EventArgs)
Opens the popup to show the list items.
Specifies the event arguments
Declaration
public Task Show(EventArgs args = null)
Parameters
Type |
Name |
Description |
System.EventArgs |
args |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|