Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfTimePicker<TValue>

    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
    SfInputTextBase<TValue>.IsClearButtonClicked
    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>, IMaskPlaceholder
    Type Parameters
    Name Description
    TValue

    Constructors

    SfTimePicker()

    Declaration
    public SfTimePicker()

    Properties

    AllowEdit

    Gets or sets a boolean value to AllowEdit whether the SfTimePicker<TValue> allows user to change the value via typing.

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

    true, if the TimePicker allows user to change the value via typing; otherwise, false user to change the value via picker only. The default value is true.

    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

    EnableMask

    Gets or sets mask rendering in the SfTimePicker<TValue> component.

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

    true, if the component render with mask format; otherwise, false. The default value is false.

    Remarks

    The Enable mask property restricts the user to type the unwanted characters in the text area. It allows only eligible characters to type.

    FloatLabelType

    Gets or sets the FloatLabelType 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

    Gets or sets 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

    Accepts format value in string type. The default culture format is h:mm tt.

    HtmlAttributes

    Gets or sets the additional HtmlAttributes such as styles, class, and more to the root element.

    Declaration
    public Dictionary<string, object> HtmlAttributes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>
    Remarks

    Additional attributes can be added by specifying an inline attribute or by specifying @attributes directive.

    InputAttributes

    Gets or sets the additional InputAttributes such as disabled, value, and more to the root element.

    Declaration
    public Dictionary<string, object> InputAttributes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>
    Remarks

    If you configured both property and equivalent input attribute, then the component considers the property value.

    KeyConfigs

    Customizes the KeyConfigs in SfTimePicker<TValue> component.

    Declaration
    public Dictionary<string, object> KeyConfigs { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>
    Remarks

    When using German keyboard, the key actions can be customized using these shortcuts.

    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

    Gets or sets the text that is shown as a hint or Placeholder until the user focuses or enter a value in TimePicker.

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

    Accepts a string value. The default value is string.Empty

    Remarks

    The property is depending on the FloatLabelType property.

    Readonly

    Gets or sets the boolean value to Readonly whether the SfTimePicker<TValue> allows the user to change the text.

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

    true, if the TimePicker value cannot be edited; otherwise, false. The default value is true.

    ScrollTo

    Gets or sets the scroll bar position.

    Declaration
    public Nullable<DateTime> ScrollTo { get; set; }
    Property Value
    Type Description
    System.Nullable<System.DateTime>

    A Datetime value is set to ScrollTo property. If there is no value is selected in the popup list or the given value is not present in the popup list.

    ShowClearButton

    Gets or sets a boolean value to ShowClearButton this indicates whether the clear button is displayed in SfTimePicker<TValue> component.

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

    true, if the clear icon was shown; otherwise, false. The default value is false.

    Step

    Gets or sets the time interval. This time interval between the two adjacent time values in the popup list.

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

    Accepts a integer value. The default value is 30.

    StrictMode

    Gets or sets the component to act as strict So that it allows to enter of only a valid date value within a specified range, or else it will reset to the previous value.

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

    true, if this property won't allow to enter an invalid date; otherwise, false It allows invalid or out-of-range date value with highlighted error class. The default value is false.

    TabIndex

    Gets or sets the TabIndex order of the TimePicker component.

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

    Accepts integer value. The default value is 0.

    TimePickerEditContext

    Gets or sets the edit context of timepicker.

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

    Width

    Gets or sets the Width of the SfTimePicker<TValue> component.

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

    Accepts a string value. The default value is null

    ZIndex

    Gets or sets the ZIndex value of the TimePicker popup element.

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

    Accepts integer value. The default value is 1000.

    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)

    CreateMask()

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

    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 - 2023 Syncfusion Inc. All Rights Reserved