blazor-devexpress-dot-blazor-dot-dxtimeedit-1-a11c0787.md
Specifies the minimum time value that can be selected in the Time Edit.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[Parameter]
public TimeSpan MinTime { get; set; }
| Type | Description |
|---|---|
| TimeSpan |
A TimeSpan value in the range from 0 to a day that specifies the minimum time value.
|
Use the MinTime and MaxTime properties to specify the range of available time values. The Time Edit’s time picker disables times outside the range.
The default minimum and maximum values are TimeSpan(0) and TimeSpan(1, 0, 0, 0). Custom values should meet the following criteria:
Note
The following code snippet implements the Time Edit component that allows users to select time from the current hour.
<DxTimeEdit @bind-Time="@TimeValue"
MinTime="@MinTime"
MaxTime="@MaxTime">
</DxTimeEdit>
@code {
TimeSpan TimeValue { get; set; } = DateTime.Now.TimeOfDay;
TimeSpan MinTime { get; set; }
TimeSpan MaxTime { get; set; }
protected override void OnInitialized() {
MinTime = new TimeSpan(TimeValue.Hours, 0, 0);
MaxTime = new TimeSpan(TimeValue.Hours, 59, 59);
}
}
Run Demo: Time Edit — Time Range
See Also