DxTimeEdit<T>.OutOfRangeNotificationText Property

The notification message displayed when a user selects a time value outside a range in the Time Edit.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll

Declaration

[Parameter]
public string OutOfRangeNotificationText { get; set; }

Property Value

Type Description
String

A notification text.

Remarks

The Time Edit component allows you to specify a range of available time values: MinTime and MaxTime. The component disables time values that are out of the range. If a user types a value that is out of the range, the Time Edit keeps the previously selected value.

If a user tries to navigate to a time value that is out of the range, the component shows a notification message. The default notification text is "The selected time value should be between MinTime and MaxTime.".

To customize the notification text, use the OutOfRangeNotificationText property.

<DxTimeEdit @bind-Time="@TimeValue" 
            MinTime="@MinTime"
            MaxTime="@MaxTime"
            OutOfRangeNotificationText="Booking for the next hour is still not allowed. Please select time from the current hour." >
</DxTimeEdit>

@code {
    TimeSpan timeValue = DateTime.Now.TimeOfDay;
    TimeSpan TimeValue { get => timeValue; set { timeValue = value; InvokeAsync(StateHasChanged); } }

    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);
    }
}

Time Edit Out of Range Dates Notification

See Also