Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenTimeSpanPicker<TValue>

    RadzenTimeSpanPicker component.

    Inheritance
    object
    ComponentBase
    RadzenComponent
    RadzenTimeSpanPicker<TValue>
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    IRadzenFormComponent
    Inherited Members
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.OnContextMenu(MouseEventArgs)
    RadzenComponent.GetCssClass()
    RadzenComponent.GetId()
    RadzenComponent.Debounce(Func<Task>, int)
    RadzenComponent.RaiseContextMenu(MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.RaiseMouseLeave()
    RadzenComponent.Attributes
    RadzenComponent.Element
    RadzenComponent.MouseEnter
    RadzenComponent.MouseLeave
    RadzenComponent.ContextMenu
    RadzenComponent.Culture
    RadzenComponent.DefaultCulture
    RadzenComponent.Style
    RadzenComponent.Visible
    RadzenComponent.UniqueID
    RadzenComponent.JSRuntime
    RadzenComponent.IsJSRuntimeAvailable
    RadzenComponent.Reference
    RadzenComponent.CurrentStyle
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.StateHasChanged()
    ComponentBase.ShouldRender()
    ComponentBase.OnAfterRender(bool)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.DispatchExceptionAsync(Exception)
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Radzen.Blazor
    Assembly: Radzen.Blazor.dll
    Syntax
    public class RadzenTimeSpanPicker<TValue> : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent
    Type Parameters
    Name Description
    TValue

    TimeSpan and nullable TimeSpan are supported.

    Examples
    <RadzenTimeSpanPicker @bind-Value="@someValue" TValue="TimeSpan" Change=@(args => Console.WriteLine($"Selected time span: {args}")) />

    Constructors

    RadzenTimeSpanPicker()

    RadzenTimeSpanPicker component.

    Declaration
    public RadzenTimeSpanPicker()
    Examples
    <RadzenTimeSpanPicker @bind-Value="@someValue" TValue="TimeSpan" Change=@(args => Console.WriteLine($"Selected time span: {args}")) />

    Fields

    input

    Gets the input reference.

    Declaration
    protected ElementReference input
    Field Value
    Type Description
    ElementReference

    Properties

    AllowClear

    Specifies whether the value can be cleared.

    Declaration
    [Parameter]
    public bool AllowClear { get; set; }
    Property Value
    Type Description
    bool

    true if value can be cleared; otherwise, false.

    AllowInput

    Specifies whether input in the input field is allowed. Set to true by default.

    Declaration
    [Parameter]
    public bool AllowInput { get; set; }
    Property Value
    Type Description
    bool

    true if input is allowed; otherwise, false.

    Change

    Specifies the callback of the underlying nullable TimeSpan value.

    Declaration
    [Parameter]
    public EventCallback<TimeSpan?> Change { get; set; }
    Property Value
    Type Description
    EventCallback<TimeSpan?>

    ConfirmationButtonText

    Specifies the text of the confirmation button. Used only if ShowConfirmationButton is

    true
    .
    Declaration
    [Parameter]
    public string ConfirmationButtonText { get; set; }
    Property Value
    Type Description
    string

    DaysStep

    Specifies the step of the days field in the picker panel.

    Declaration
    [Parameter]
    public string DaysStep { get; set; }
    Property Value
    Type Description
    string

    DaysUnitText

    Specifies the days label text.

    Declaration
    [Parameter]
    public string DaysUnitText { get; set; }
    Property Value
    Type Description
    string

    Disabled

    Specifies whether the input field is disabled.

    Declaration
    [Parameter]
    public bool Disabled { get; set; }
    Property Value
    Type Description
    bool

    true if disabled; otherwise, false.

    EditContext

    Specifies the edit context of this component.

    Declaration
    [CascadingParameter]
    public EditContext EditContext { get; set; }
    Property Value
    Type Description
    EditContext

    FieldIdentifier

    Gets the field identifier.

    Declaration
    [Parameter]
    public FieldIdentifier FieldIdentifier { get; set; }
    Property Value
    Type Description
    FieldIdentifier

    FieldPrecision

    Specifies the most precise time unit field in the picker panel. Set to Second by default.

    Declaration
    [Parameter]
    public TimeSpanUnit FieldPrecision { get; set; }
    Property Value
    Type Description
    TimeSpanUnit

    Form

    Specifies the form this component belongs to.

    Declaration
    [CascadingParameter]
    public IRadzenForm Form { get; set; }
    Property Value
    Type Description
    IRadzenForm

    FormFieldContext

    Specifies the RadzenFormField context of this component.

    Declaration
    public IFormFieldContext FormFieldContext { get; set; }
    Property Value
    Type Description
    IFormFieldContext

    FormattedValue

    Gets the formatted value.

    Declaration
    public string FormattedValue { get; }
    Property Value
    Type Description
    string

    HasValue

    Indicates whether this instance has a confirmed value.

    Declaration
    public bool HasValue { get; }
    Property Value
    Type Description
    bool

    true if this instance has value; otherwise, false.

    HoursStep

    Specifies the step of the hours field in the picker panel.

    Declaration
    [Parameter]
    public string HoursStep { get; set; }
    Property Value
    Type Description
    string

    HoursUnitText

    Specifies the hours label text.

    Declaration
    [Parameter]
    public string HoursUnitText { get; set; }
    Property Value
    Type Description
    string

    Inline

    Specifies whether the component is inline or shows a popup.

    Declaration
    [Parameter]
    public bool Inline { get; set; }
    Property Value
    Type Description
    bool

    true if inline; false if shows a popup.

    InputAttributes

    Specifies additional custom attributes that will be rendered by the input.

    Declaration
    [Parameter]
    public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, object>

    InputClass

    Specifies the input CSS classes, separated with spaces.

    Declaration
    [Parameter]
    public string InputClass { get; set; }
    Property Value
    Type Description
    string

    IsBound

    Indicates whether this instance is bound ValueChanged callback has delegate).

    Declaration
    public bool IsBound { get; }
    Property Value
    Type Description
    bool

    true if this instance is bound; otherwise, false.

    Max

    Specifies the maximum time span allowed.

    Declaration
    [Parameter]
    public TimeSpan Max { get; set; }
    Property Value
    Type Description
    TimeSpan

    MicrosecondsStep

    Specifies the step of the microseconds field in the picker panel.

    Declaration
    [Parameter]
    public string MicrosecondsStep { get; set; }
    Property Value
    Type Description
    string

    MicrosecondsUnitText

    Specifies the microseconds label text.

    Declaration
    [Parameter]
    public string MicrosecondsUnitText { get; set; }
    Property Value
    Type Description
    string

    MillisecondsStep

    Specifies the step of the milliseconds field in the picker panel.

    Declaration
    [Parameter]
    public string MillisecondsStep { get; set; }
    Property Value
    Type Description
    string

    MillisecondsUnitText

    Specifies the milliseconds label text.

    Declaration
    [Parameter]
    public string MillisecondsUnitText { get; set; }
    Property Value
    Type Description
    string

    Min

    Specifies the minimum time span allowed.

    Declaration
    [Parameter]
    public TimeSpan Min { get; set; }
    Property Value
    Type Description
    TimeSpan

    MinutesStep

    Specifies the step of the minutes field in the picker panel.

    Declaration
    [Parameter]
    public string MinutesStep { get; set; }
    Property Value
    Type Description
    string

    MinutesUnitText

    Specifies the minutes label text.

    Declaration
    [Parameter]
    public string MinutesUnitText { get; set; }
    Property Value
    Type Description
    string

    Name

    Specifies the name of the input field.

    Declaration
    [Parameter]
    public string Name { get; set; }
    Property Value
    Type Description
    string

    NegativeButtonText

    Specifies the text of the negative value button.

    Declaration
    [Parameter]
    public string NegativeButtonText { get; set; }
    Property Value
    Type Description
    string

    NegativeValueText

    Specifies the text displayed next to the fields in the panel when the value is negative and there's no sign picker.

    Declaration
    [Parameter]
    public string NegativeValueText { get; set; }
    Property Value
    Type Description
    string

    PadTimeValues

    Specifies whether the time fields in the panel, except for the days field, are padded with leading zeros.

    Declaration
    [Parameter]
    public bool PadTimeValues { get; set; }
    Property Value
    Type Description
    bool

    true if fields are padded; otherwise, false.

    ParseInput

    Specifies custom function to parse the input. If it's not defined or the function it returns null, a built-in parser us used instead.

    Declaration
    [Parameter]
    public Func<string, TimeSpan?> ParseInput { get; set; }
    Property Value
    Type Description
    Func<string, TimeSpan?>

    Placeholder

    Specifies the input placeholder.

    Declaration
    [Parameter]
    public string Placeholder { get; set; }
    Property Value
    Type Description
    string

    PopupButtonClass

    Specifies the popup toggle button CSS classes, separated with spaces.

    Declaration
    [Parameter]
    public string PopupButtonClass { get; set; }
    Property Value
    Type Description
    string

    PopupRenderMode

    Specifies the render mode of the popup.

    Declaration
    [Parameter]
    public PopupRenderMode PopupRenderMode { get; set; }
    Property Value
    Type Description
    PopupRenderMode

    PositiveButtonText

    Specifies the text of the positive value button.

    Declaration
    [Parameter]
    public string PositiveButtonText { get; set; }
    Property Value
    Type Description
    string

    PositiveValueText

    Specifies the text displayed next to the fields in the panel when the value is positive and there's no sign picker.

    Declaration
    [Parameter]
    public string PositiveValueText { get; set; }
    Property Value
    Type Description
    string

    ReadOnly

    Specifies whether the input field is read only.

    Declaration
    [Parameter]
    public bool ReadOnly { get; set; }
    Property Value
    Type Description
    bool

    true if read only; otherwise, false.

    SecondsStep

    Specifies the step of the seconds field in the picker panel.

    Declaration
    [Parameter]
    public string SecondsStep { get; set; }
    Property Value
    Type Description
    string

    SecondsUnitText

    Specifies the seconds label text.

    Declaration
    [Parameter]
    public string SecondsUnitText { get; set; }
    Property Value
    Type Description
    string

    ShowConfirmationButton

    Specifies whether to display the confirmation button in the panel to accept changes.

    Declaration
    [Parameter]
    public bool ShowConfirmationButton { get; set; }
    Property Value
    Type Description
    bool

    true if the confirmation button is shown; otherwise, false.

    ShowPopupButton

    Specifies whether to display popup icon button in the input field.

    Declaration
    [Parameter]
    public bool ShowPopupButton { get; set; }
    Property Value
    Type Description
    bool

    true to display the button to open the popup; false to hide the button to open the popup, clicking the input field opens the popup instead.

    TabIndex

    Specifies the tab index.

    Declaration
    [Parameter]
    public int TabIndex { get; set; }
    Property Value
    Type Description
    int

    TimeSpanFormat

    Specifies the time span format in the input field. For more details, see the documentation of standard and custom time span format strings.

    Declaration
    [Parameter]
    public string TimeSpanFormat { get; set; }
    Property Value
    Type Description
    string

    TogglePopupAriaLabel

    Specifies the aria label for the toggle popup button.

    Declaration
    [Parameter]
    public string TogglePopupAriaLabel { get; set; }
    Property Value
    Type Description
    string

    Value

    Specifies the value of the component.

    Declaration
    [Parameter]
    public TValue Value { get; set; }
    Property Value
    Type Description
    TValue

    ValueChanged

    Specifies the callback of the value change.

    Declaration
    [Parameter]
    public EventCallback<TValue> ValueChanged { get; set; }
    Property Value
    Type Description
    EventCallback<TValue>

    ValueExpression

    Specifies the value expression used while creating the FieldIdentifier.

    Declaration
    [Parameter]
    public Expression<Func<TValue>> ValueExpression { get; set; }
    Property Value
    Type Description
    Expression<Func<TValue>>

    Methods

    BuildRenderTree(RenderTreeBuilder)

    RadzenTimeSpanPicker component.

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    Close()

    Closes this instance popup.

    Declaration
    public Task Close()
    Returns
    Type Description
    Task

    Dispose()

    Detaches event handlers and disposes Reference.

    Declaration
    public override void Dispose()
    Overrides
    RadzenComponent.Dispose()

    FocusAsync()

    Sets the focus.

    Declaration
    public ValueTask FocusAsync()
    Returns
    Type Description
    ValueTask

    GetComponentCssClass()

    Gets the component CSS class.

    Declaration
    protected override string GetComponentCssClass()
    Returns
    Type Description
    string
    Overrides
    RadzenComponent.GetComponentCssClass()

    GetValue()

    Gets the value of the component.

    Declaration
    public object GetValue()
    Returns
    Type Description
    object

    System.Object.

    OnAfterRenderAsync(bool)

    Called by the Blazor runtime.

    Declaration
    protected override Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    bool firstRender
    Returns
    Type Description
    Task
    Overrides
    RadzenComponent.OnAfterRenderAsync(bool)

    OnInitialized()

    Called by the Blazor runtime.

    Declaration
    protected override void OnInitialized()
    Overrides
    RadzenComponent.OnInitialized()

    SetParametersAsync(ParameterView)

    Called by the Blazor runtime when parameters are set.

    Declaration
    public override Task SetParametersAsync(ParameterView parameters)
    Parameters
    Type Name Description
    ParameterView parameters

    The parameters.

    Returns
    Type Description
    Task
    Overrides
    RadzenComponent.SetParametersAsync(ParameterView)

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    IRadzenFormComponent

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT