Back to Devexpress

DxDateEdit<T>.OutOfRangeNotificationText Property

blazor-devexpress-dot-blazor-dot-dxdateedit-1-7e80a376.md

latest2.5 KB
Original Source

DxDateEdit<T>.OutOfRangeNotificationText Property

The notification message displayed in the scroll picker mode when a user selects a date outside a pre-defined date range.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

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

Property Value

TypeDescription
String

A notification text.

|

Remarks

The Date Edit component allows you to specify a range of available dates: MinDate and MaxDate. The component’s calendar disables dates that are out of the range and hides navigation arrows for them. If a user types a date that is out of the range, the Date Edit keeps the previously selected date.

In scroll picker mode, the component shows a notification message each time a user tries to navigate to a date that is out of the range. The default notification text is “The selected date should be between MinDate and MaxDate.“.

To customize the notification text, use the OutOfRangeNotificationText property.

razor
<DxDateEdit @bind-Date="@DateTimeValue" 
            PickerDisplayMode="DatePickerDisplayMode.ScrollPicker"
            MinDate="@(new DateTime(2024, 10, 01))"
            MaxDate="@(new DateTime(2024, 10, 31))"
            OutOfRangeNotificationText="Booking for November is still not allowed. Please select the date in October.">
</DxDateEdit>

@code {
    DateTime dateTimeValue = DateTime.Now;
    DateTime DateTimeValue { get => dateTimeValue; set { dateTimeValue = value; InvokeAsync(StateHasChanged); } }
}

See Also

DxDateEdit<T> Class

DxDateEdit<T> Members

DevExpress.Blazor Namespace