Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfTimePicker<TValue> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    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
    SfBaseComponent
    SfInputTextBase<TValue>
    SfTimePicker<TValue>
    Inherited Members
    SfInputTextBase<TValue>.CONTROL_CONTAINER
    SfInputTextBase<TValue>.CONTROL_OLD_CONTAINER
    SfInputTextBase<TValue>.INPUTGROUP
    SfInputTextBase<TValue>.CLEARICONHIDE
    SfInputTextBase<TValue>.MULTILINE
    SfInputTextBase<TValue>.DISABLE
    SfInputTextBase<TValue>.INPUT
    SfInputTextBase<TValue>.INPUTFOCUS
    SfInputTextBase<TValue>.FLOATINPUT
    SfInputTextBase<TValue>.FLOATTEXT
    SfInputTextBase<TValue>.FLOATLABELBOTTOM
    SfInputTextBase<TValue>.FLOATLABELTOP
    SfInputTextBase<TValue>.INCREMENT_TITLE
    SfInputTextBase<TValue>.DECREMENT_TITLE
    SfInputTextBase<TValue>.INCREMENT
    SfInputTextBase<TValue>.DECREMENT
    SfInputTextBase<TValue>.DISABLED_ATTR
    SfInputTextBase<TValue>.ARIA_DISABLED
    SfInputTextBase<TValue>.APPEND
    SfInputTextBase<TValue>.PREPEND
    SfInputTextBase<TValue>.CLEAR_ICON_HIDE
    SfInputTextBase<TValue>.GROUP_ICON
    SfInputTextBase<TValue>.SPACE
    SfInputTextBase<TValue>.SPIN_DOWN
    SfInputTextBase<TValue>.SPIN_UP
    SfInputTextBase<TValue>.DISABLE_ICON
    SfInputTextBase<TValue>.OnInputHandler(ChangeEventArgs)
    SfInputTextBase<TValue>.OnPasteHandler(ClipboardEventArgs)
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.BlurHandler()
    SfInputTextBase<TValue>.OnChangeHandler(ChangeEventArgs)
    SfInputTextBase<TValue>.WireClearBtnEvents()
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnChange
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnInput
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnPaste
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnBlur
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnFocus
    SfInputTextBase<TValue>.ID
    SfInputTextBase<TValue>.Value
    SfInputTextBase<TValue>._value
    SfInputTextBase<TValue>.ValueChanged
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.ValueExpression
    SfInputTextBase<TValue>.InputEditContext
    SfInputTextBase<TValue>.CssClass
    SfInputTextBase<TValue>.EnablePersistence
    SfInputTextBase<TValue>.EnableRtl
    SfInputTextBase<TValue>.Enabled
    SfInputTextBase<TValue>.ValidateOnInput
    SfInputTextBase<TValue>.MultilineInput
    SfInputTextBase<TValue>.BaseAutocomplete
    SfInputTextBase<TValue>.ContainerAttr
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.SpinButton
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.ValueTemplate
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.IsValueTemplate
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.ClickStopPropagation
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.MouseDowSpinnerPrevent
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.PreventIconHandler
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.MousePreventContainer
    SfInputTextBase<TValue>.ListOfButtons
    SfInputTextBase<TValue>.DataId
    SfInputTextBase<TValue>.inputAttr
    SfInputTextBase<TValue>.containerAttributes
    SfInputTextBase<TValue>.FloatLabel
    SfInputTextBase<TValue>.ClearElement
    SfInputTextBase<TValue>.IsFocused
    SfInputTextBase<TValue>.IncrementTitle
    SfInputTextBase<TValue>.DecrementTitle
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.ContainerClass
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.RootClass
    SfInputTextBase<TValue>.ComponentReference
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(Boolean)
    SfBaseComponent.OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
    Namespace: Syncfusion.Blazor.Calendars
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SfTimePicker<TValue> : SfInputTextBase<TValue>
    Type Parameters
    Name Description
    TValue

    Constructors

    SfTimePicker()

    Declaration
    public SfTimePicker()

    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

    BaseFloatLabelType

    Declaration
    protected override FloatLabelType BaseFloatLabelType { get; set; }
    Property Value
    Type Description
    FloatLabelType
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.BaseFloatLabelType

    BaseHtmlAttributes

    Declaration
    protected override Dictionary<string, object> BaseHtmlAttributes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.BaseHtmlAttributes

    BaseInputAttributes

    Declaration
    protected override Dictionary<string, object> BaseInputAttributes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.BaseInputAttributes

    BaseIsReadOnlyInput

    Declaration
    protected override bool BaseIsReadOnlyInput { get; set; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.BaseIsReadOnlyInput

    BasePlaceholder

    Declaration
    protected override string BasePlaceholder { get; set; }
    Property Value
    Type Description
    System.String
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.BasePlaceholder

    BaseReadonly

    Declaration
    protected override bool BaseReadonly { get; set; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.BaseReadonly

    BaseShowClearButton

    Declaration
    protected override bool BaseShowClearButton { get; set; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.BaseShowClearButton

    BaseTabIndex

    Declaration
    protected override int BaseTabIndex { get; set; }
    Property Value
    Type Description
    System.Int32
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.BaseTabIndex

    BaseWidth

    Declaration
    protected override string BaseWidth { get; set; }
    Property Value
    Type Description
    System.String
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.BaseWidth

    FloatLabelType

    Specifies the floating label behavior of the TextBox that the placeholder text floats above the TextBox based on the following values.

    Possible values are:

    • NeverNever floats the label in the TextBox when the placeholder is available.
    • AlwaysThe floating label always floats above the TextBox.
    • AutoThe floating label floats above the TextBox after focusing it or when enters the value in it.
    Declaration
    public FloatLabelType FloatLabelType { get; set; }
    Property Value
    Type Description
    FloatLabelType

    Format

    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 property and equivalent html attributes, 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>

    InputAttributes

    You can add the additional input attributes such as disabled, value, and more to the root element. If you configured both 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>

    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 boolean value whether the TextBox allows user to change the text.

    Declaration
    public string Placeholder { get; set; }
    Property Value
    Type Description
    System.String

    Readonly

    Specifies the boolean value whether the TextBox allows user to change the text.

    Declaration
    public bool Readonly { get; set; }
    Property Value
    Type Description
    System.Boolean

    ScrollTo

    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>

    ShowClearButton

    Specifies a boolean value that indicates whether the clear button is displayed in TextBox.

    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

    Specifies the TimePicker to act as strict. So that, it allows to enter only a valid time value within a specified range or else it will resets to previous value.

    By default, StrictMode is in false. It allows invalid or out-of-range time value with highlighted error class.

    Declaration
    public bool StrictMode { get; set; }
    Property Value
    Type Description
    System.Boolean

    TabIndex

    Specifies the tab order of the TextBox component.

    Declaration
    public int TabIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    TimePickerEditContext

    Specifies the edit context of timepicker.

    Declaration
    protected EditContext TimePickerEditContext { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.Forms.EditContext

    Width

    Specifies the width of the TextBox 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

    ChangeHandler(ChangeEventArgs)

    Declaration
    protected override Task ChangeHandler(ChangeEventArgs args)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.ChangeEventArgs args
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.ChangeHandler(Microsoft.AspNetCore.Components.ChangeEventArgs)

    FocusAsync()

    Sets the focus to the TimePicker component for interaction.

    Declaration
    public Task FocusAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    FocusHandler(FocusEventArgs)

    Declaration
    protected override Task FocusHandler(FocusEventArgs args)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Web.FocusEventArgs args
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.FocusHandler(Microsoft.AspNetCore.Components.Web.FocusEventArgs)

    FocusOutAsync()

    Remove the focus from the TimePicker component, if the component is in focus state.

    Declaration
    public Task FocusOutAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    FocusOutHandler(FocusEventArgs)

    Declaration
    protected override Task FocusOutHandler(FocusEventArgs args)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Web.FocusEventArgs args
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.FocusOutHandler(Microsoft.AspNetCore.Components.Web.FocusEventArgs)

    FormatValue(String)

    Declaration
    protected override TValue FormatValue(string genericValue = null)
    Parameters
    Type Name Description
    System.String genericValue
    Returns
    Type Description
    TValue
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.FormatValue(System.String)

    FormatValueAsString(TValue)

    Declaration
    protected override string FormatValueAsString(TValue formatValue)
    Parameters
    Type Name Description
    TValue formatValue
    Returns
    Type Description
    System.String
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.FormatValueAsString(TValue)

    GetPersistDataAsync()

    Gets the properties to be maintained in the persisted state.

    Declaration
    public Task<string> GetPersistDataAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.String>

    Task.

    HidePopupAsync(EventArgs)

    Hides the TimePicker popup.

    Declaration
    public Task HidePopupAsync(EventArgs args = null)
    Parameters
    Type Name Description
    System.EventArgs args
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    InputHandler(ChangeEventArgs)

    Declaration
    protected override Task InputHandler(ChangeEventArgs args)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.ChangeEventArgs args
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.InputHandler(Microsoft.AspNetCore.Components.ChangeEventArgs)

    OnAfterRenderAsync(Boolean)

    Triggers after the component get rendered.

    Declaration
    protected override Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    System.Boolean firstRender

    true if the component rendered for the first time.

    Returns
    Type Description
    System.Threading.Tasks.Task

    The System.Threading.Tasks.Task.

    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnAfterRenderAsync(System.Boolean)

    OnInitializedAsync()

    Triggers while initial rendering of the component.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    The System.Threading.Tasks.Task.

    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnInitializedAsync()

    OnParametersSetAsync()

    Triggers while dynamically changing the properties of the component.

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    The System.Threading.Tasks.Task.

    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnParametersSetAsync()

    ShowPopupAsync(EventArgs)

    Opens the popup to show the list items. Task.

    Declaration
    public Task ShowPopupAsync(EventArgs args = null)
    Parameters
    Type Name Description
    System.EventArgs args
    Returns
    Type Description
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved