# RadzenTimeSpanPicker<TValue> Class

RadzenTimeSpanPicker component.

Namespace: [Radzen.Blazor](https://blazor.radzen.com/docs/api/Radzen.Blazor.md)

Assembly: Radzen.Blazor.dll

## Inheritance

- Object
- ComponentBase
- [RadzenComponent](https://blazor.radzen.com/docs/api/Radzen.RadzenComponent.md)
- RadzenTimeSpanPicker<TValue>

## Implements

- IComponent
- IHandleEvent
- IHandleAfterRender
- [IRadzenFormComponent](https://blazor.radzen.com/docs/api/Radzen.IRadzenFormComponent.md)

## Syntax

```csharp
public class RadzenTimeSpanPicker<TValue> : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IRadzenFormComponent
```

## Type Parameters

| Name | Description |
|------|-------------|
| TValue | TYPEREF:System.TimeSpanTimeSpan/TYPEREF and nullable TYPEREF:System.TimeSpanTimeSpan/TYPEREF are supported. |

## Examples

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

## Constructors

| Constructor | Description |
|-------------|-------------|
| `public RadzenTimeSpanPicker<TValue>()` | RadzenTimeSpanPicker component. |

## Fields

| Field | Type | Description |
|------|------|-------------|
| input | `ElementReference` | Gets the input reference. |

## Properties

| Property | Type | Description |
|------|------|-------------|
| AllowClear | `bool` | Specifies whether the value can be cleared. |
| AllowInput | `bool` | Specifies whether input in the input field is allowed. Set to true by default. |
| Change | `EventCallback<TimeSpan?>` | Specifies the callback of the underlying nullable TimeSpan value. |
| ClearAriaLabel | `string` | Gets or sets the clear button aria label text. |
| ConfirmationButtonText | `string` | Specifies the text of the confirmation button. Used only if ShowConfirmationButton is true. |
| DaysStep | `string` | Specifies the step of the days field in the picker panel. |
| DaysUnitText | `string` | Specifies the days label text. |
| Disabled | `bool` | Specifies whether the input field is disabled. |
| EditContext | `Forms.EditContext` | Specifies the edit context of this component. |
| FieldIdentifier | `Forms.FieldIdentifier` | Gets the field identifier. |
| FieldPrecision | [`TimeSpanUnit`](https://blazor.radzen.com/docs/api/Radzen.TimeSpanUnit.md) | Specifies the most precise time unit field in the picker panel. Set to Second by default. |
| Form | [`IRadzenForm`](https://blazor.radzen.com/docs/api/Radzen.IRadzenForm.md) | Specifies the form this component belongs to. |
| FormFieldContext | [`IFormFieldContext`](https://blazor.radzen.com/docs/api/Radzen.Blazor.IFormFieldContext.md) | Specifies the [RadzenFormField](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenFormField.md) context of this component. |
| FormattedValue | `string` | Gets the formatted value. |
| HasValue | `bool` | Indicates whether this instance has a confirmed value. |
| HoursStep | `string` | Specifies the step of the hours field in the picker panel. |
| HoursUnitText | `string` | Specifies the hours label text. |
| Inline | `bool` | Specifies whether the component is inline or shows a popup. |
| InputAttributes | `IReadOnlyDictionary<string, object>` | Specifies additional custom attributes that will be rendered by the input. |
| InputClass | `string` | Specifies the input CSS classes, separated with spaces. |
| InputId | `string` | Gets the id of the input element: Name when set, otherwise an id derived from the component id. |
| InputSize | [`InputSize`](https://blazor.radzen.com/docs/api/Radzen.InputSize.md) | Gets or sets the size of the component. |
| IsBound | `bool` | Indicates whether this instance is bound ValueChanged callback has delegate). |
| Max | `TimeSpan` | Specifies the maximum time span allowed. |
| MicrosecondsStep | `string` | Specifies the step of the microseconds field in the picker panel. |
| MicrosecondsUnitText | `string` | Specifies the microseconds label text. |
| MillisecondsStep | `string` | Specifies the step of the milliseconds field in the picker panel. |
| MillisecondsUnitText | `string` | Specifies the milliseconds label text. |
| Min | `TimeSpan` | Specifies the minimum time span allowed. |
| MinutesStep | `string` | Specifies the step of the minutes field in the picker panel. |
| MinutesUnitText | `string` | Specifies the minutes label text. |
| Name | `string` | Specifies the name of the input field. |
| NegativeButtonText | `string` | Specifies the text of the negative value button. |
| NegativeValueText | `string` | Specifies the text displayed next to the fields in the panel when the value is negative and there's no sign picker. |
| PadTimeValues | `bool` | Specifies whether the time fields in the panel, except for the days field, are padded with leading zeros. |
| ParseInput | `Func<string, TimeSpan?>` | 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. |
| Placeholder | `string` | Specifies the input placeholder. |
| PopupAriaLabel | `string` | Specifies the aria label for the popup. |
| PopupButtonClass | `string` | Specifies the popup toggle button CSS classes, separated with spaces. |
| PopupRenderMode | [`PopupRenderMode`](https://blazor.radzen.com/docs/api/Radzen.PopupRenderMode.md) | Specifies the render mode of the popup. |
| PositiveButtonText | `string` | Specifies the text of the positive value button. |
| PositiveValueText | `string` | Specifies the text displayed next to the fields in the panel when the value is positive and there's no sign picker. |
| ReadOnly | `bool` | Specifies whether the input field is read only. |
| SecondsStep | `string` | Specifies the step of the seconds field in the picker panel. |
| SecondsUnitText | `string` | Specifies the seconds label text. |
| ShowConfirmationButton | `bool` | Specifies whether to display the confirmation button in the panel to accept changes. |
| ShowPopupButton | `bool` | Specifies whether to display popup icon button in the input field. |
| TabIndex | `int` | Specifies the tab index. |
| TimeSpanFormat | `string` | Specifies the time span format in the input field. For more details, see the documentation of and time span format strings. |
| TogglePopupAriaLabel | `string` | Specifies the aria label for the toggle popup button. |
| Value | `TValue` | Specifies the value of the component. |
| ValueChanged | `EventCallback<TValue>` | Specifies the callback of the value change. |
| ValueExpression | `Expressions.Expression<Func<TValue>>` | Specifies the value expression used while creating the FieldIdentifier. |

## Methods

| Method | Returns | Description |
|------|---------|-------------|
| `BuildRenderTree(Rendering.RenderTreeBuilder __builder)` | `void` |  |
| `Close()` | `Task` | Closes this instance popup. |
| `Dispose()` | `void` |  |
| `FocusAsync()` | `ValueTask` |  |
| `GetComponentCssClass()` | `string` |  |
| `GetValue()` | `object` | Gets the value of the component. Returns: System.Object. |
| `OnAfterRenderAsync(bool firstRender)` | `Task` |  |
| `OnInitialized()` | `void` |  |
| `OnParametersSet()` | `void` |  |
| `SetParametersAsync(ParameterView parameters)` | `Task` |  |

## Inherited Members

- From [RadzenComponent](https://blazor.radzen.com/docs/api/Radzen.RadzenComponent.md): AddContextMenu, Attributes, ContextMenu, Culture, CurrentStyle, Debounce, DefaultCulture, DefaultUICulture, Element, GetCssClass, GetId, GetIdAttribute, IsJSRuntimeAvailable, JSRuntime, Localize, MouseEnter, MouseLeave, OnBecameInvisible, OnContextMenu, OnMouseEnter, OnMouseLeave, RaiseContextMenu, RaiseMouseEnter, RaiseMouseLeave, Reference, Style, UICulture, UniqueID, Visible
- From ComponentBase: Assets, AssignedRenderMode, DispatchExceptionAsync, InvokeAsync, OnAfterRender, OnInitializedAsync, OnParametersSetAsync, RendererInfo, ShouldRender, StateHasChanged

