Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenTimeSpanPicker<TValue>

    RadzenTimeSpanPicker component.

    Inheritance
    System.Object
    RadzenComponent
    RadzenTimeSpanPicker<TValue>
    Implements
    IDisposable
    IRadzenFormComponent
    Inherited Members
    RadzenComponent.Attributes
    RadzenComponent.Element
    RadzenComponent.MouseEnter
    RadzenComponent.MouseLeave
    RadzenComponent.ContextMenu
    RadzenComponent.Culture
    RadzenComponent.DefaultCulture
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.OnContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.Style
    RadzenComponent.Visible
    RadzenComponent.GetCssClass()
    RadzenComponent.GetId()
    RadzenComponent.Debounce(Func<Task>, Int32)
    RadzenComponent.UniqueID
    RadzenComponent.JSRuntime
    RadzenComponent.IsJSRuntimeAvailable
    RadzenComponent.Reference
    RadzenComponent.RaiseContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.RaiseMouseLeave()
    RadzenComponent.CurrentStyle
    Namespace: Radzen.Blazor
    Assembly: Radzen.Blazor.dll
    Syntax
    public class RadzenTimeSpanPicker<TValue> : RadzenComponent, IDisposable, IRadzenFormComponent
    Type Parameters
    Name Description
    TValue

    and nullable are supported.

    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
    public bool AllowClear { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if value can be cleared; otherwise, false.

    AllowInput

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

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

    true if input is allowed; otherwise, false.

    Change

    Specifies the callback of the underlying nullable value.

    Declaration
    public EventCallback<TimeSpan?> Change { get; set; }
    Property Value
    Type Description
    EventCallback<System.Nullable<TimeSpan>>

    ConfirmationButtonText

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

    true
    .

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

    DaysStep

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

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

    DaysUnitText

    Specifies the days label text.

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

    Disabled

    Specifies whether the input field is disabled.

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

    true if disabled; otherwise, false.

    EditContext

    Specifies the edit context of this component.

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

    FieldIdentifier

    Gets the field identifier.

    Declaration
    public FieldIdentifier FieldIdentifier { get; }
    Property Value
    Type Description
    FieldIdentifier

    FieldPrecision

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

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

    Form

    Specifies the form this component belongs to.

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

    FormattedValue

    Gets the formatted value.

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

    FormFieldContext

    Specifies the RadzenFormField context of this component.

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

    HasValue

    Indicates whether this instance has a confirmed value.

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

    true if this instance has value; otherwise, false.

    HoursStep

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

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

    HoursUnitText

    Specifies the hours label text.

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

    Inline

    Specifies whether the component is inline or shows a popup.

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

    true if inline; false if shows a popup.

    InputAttributes

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

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

    InputClass

    Specifies the input CSS classes, separated with spaces.

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

    IsBound

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

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

    true if this instance is bound; otherwise, false.

    Max

    Specifies the maximum time stamp allowed.

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

    MillisecondsStep

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

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

    MillisecondsUnitText

    Specifies the milliseconds label text.

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

    Min

    Specifies the minimum time stamp allowed.

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

    MinutesStep

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

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

    MinutesUnitText

    Specifies the minutes label text.

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

    Name

    Specifies the name of the input field.

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

    NegativeButtonText

    Specifies the text of the negative value button.

    Declaration
    public string NegativeButtonText { get; set; }
    Property Value
    Type Description
    System.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
    public string NegativeValueText { get; set; }
    Property Value
    Type Description
    System.String

    PadTimeValues

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

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

    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
    public Func<string, TimeSpan?> ParseInput { get; set; }
    Property Value
    Type Description
    Func<System.String, System.Nullable<TimeSpan>>

    Placeholder

    Specifies the input placeholder.

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

    PopupButtonClass

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

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

    PopupRenderMode

    Specifies the render mode of the popup.

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

    PositiveButtonText

    Specifies the text of the positive value button.

    Declaration
    public string PositiveButtonText { get; set; }
    Property Value
    Type Description
    System.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
    public string PositiveValueText { get; set; }
    Property Value
    Type Description
    System.String

    ReadOnly

    Specifies whether the input field is read only.

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

    true if read only; otherwise, false.

    SecondsStep

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

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

    SecondsUnitText

    Specifies the seconds label text.

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

    ShowConfirmationButton

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

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

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

    ShowPopupButton

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

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

    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
    public int TabIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    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
    public string TimeSpanFormat { get; set; }
    Property Value
    Type Description
    System.String

    TogglePopupAriaLabel

    Specifies the aria label for the toggle popup button.

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

    Value

    Specifies the value of the component.

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

    ValueChanged

    Specifies the callback of the value change.

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

    ValueExpression

    Specifies the value expression used while creating the FieldIdentifier.

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

    Methods

    Close()

    Closes this instance popup.

    Declaration
    public async 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 async ValueTask FocusAsync()
    Returns
    Type Description
    ValueTask

    GetComponentCssClass()

    Gets the component CSS class.

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

    GetValue()

    Gets the value of the component.

    Declaration
    public object GetValue()
    Returns
    Type Description
    System.Object

    System.Object.

    OnAfterRenderAsync(Boolean)

    Called by the Blazor runtime.

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

    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 async Task SetParametersAsync(ParameterView parameters)
    Parameters
    Type Name Description
    ParameterView parameters

    The parameters.

    Returns
    Type Description
    Task
    Overrides
    RadzenComponent.SetParametersAsync(ParameterView)

    Implements

    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