Back to Devexpress

ASPxDateEdit.ShowOutOfRangeWarning Property

aspnet-devexpress-dot-web-dot-aspxdateedit-d250027d.md

latest3.1 KB
Original Source

ASPxDateEdit.ShowOutOfRangeWarning Property

Gets or sets a value that specifies whether a warning message is displayed when an end-user types a date that is out of the range specified by the ASPxDateEdit.MinDate and ASPxDateEdit.MaxDate properties.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(true)]
public bool ShowOutOfRangeWarning { get; set; }
vb
<DefaultValue(True)>
Public Property ShowOutOfRangeWarning As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true, if the message is displayed, otherwise, false.

|

Remarks

When the ASPxDateEdit.MinDate or ASPxDateEdit.MaxDate property is specified, the dates that are out of the specified range cannot be entered into the date editor by end-users either by typing within the editor’s edit box or using the dropdown calendar. In the dropdown calendar, these dates are displayed using a specific style (CalendarProperties.DayOutOfRangeStyle) and don’t respond to user clicks.

When the ShowOutOfRangeWarning property is set to true, a warning message is displayed when an end-user types an unavailable date in the editor’s edit box. Note, after the editor loses focus, the date is automatically changed to the last specified allowed date.

Example 1

aspx
<dx:ASPxDateEdit ID="myDateEdit" runat="server" ShowOutOfRangeWarning="True" MinDate="2014-10-01" MaxDate="2014-10-31">
</dx:ASPxDateEdit>

Example 2

aspx
<dx:ASPxDateEdit ID="myDateEdit" runat="server" ShowOutOfRangeWarning="True" MinDate="2014-10-01">
</dx:ASPxDateEdit>

Example 3

aspx
<dx:ASPxDateEdit ID="myDateEdit" runat="server" ShowOutOfRangeWarning="True" MaxDate="2014-10-31">
</dx:ASPxDateEdit>

Note

This property is a wrapper of the DateEditProperties.ShowOutOfRangeWarning property.

See Also

Date Editor

ASPxDateEdit Class

ASPxDateEdit Members

DevExpress.Web Namespace