Skip to main content

DxTimeEdit<T>.Time Property

Specifies time that is selected in the Time Edit component.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public T Time { get; set; }

Property Value

Type Description
T

A value that defines selected time.

Remarks

Use the Time property to specify the Time Edit’s selected time…

<DxTimeEdit Time="new TimeSpan(9, 30, 0);"></DxTimeEdit>

… or bind the property to a variable that stores time.

<DxTimeEdit @bind-Time="@TimeValue" ></DxTimeEdit>

@code {
    TimeSpan TimeValue { get; set; } = DateTime.Now.TimeOfDay;
}

The Time Edit supports DateTime, Nullable DateTime, TimeSpan, and Nullable TimeSpan types.

You can use the MinTime and MaxTime properties to specify a range of available time values. The Time Edit’s time picker disables times outside the range.

Note

  • If a user types a value outside the range, the Time Edit keeps the previously selected time.
  • The Time Edit shows a notification message each time a user tries to navigate to a time value that is out of the range. To customize the notification text, use the OutOfRangeNotificationText property.
  • You can set the Time property to a time outside the range. In this case, the Time Edit shows this specified time, and the Time Edit’s picker displays the closest available time.

To handle the time change, use the TimeChanged event.

Run Demo: Time Edit

See Also