Class RadzenTimeSpanPicker<TValue>
RadzenTimeSpanPicker component.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenTimeSpanPicker<TValue> : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent
Type Parameters
| Name | Description |
|---|---|
| TValue |
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
ShowPopupButton
Specifies whether to display popup icon button in the input field.
Declaration
[Parameter]
public bool ShowPopupButton { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
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
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
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
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
OnInitialized()
Called by the Blazor runtime.
Declaration
protected override void OnInitialized()
Overrides
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 |