Skip to main content
A newer version of this page is available. .
Tab

ASPxCalendar.MaxDate Property

Gets or sets the maximum date allowed to be entered into the editor by an end-user.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(typeof(DateTime), "")]
public DateTime MaxDate { get; set; }

Property Value

Type Default Description
DateTime String.Empty

A DateTime object that specifies the editor’s maximum allowed date.

Remarks

This property is a wrapper of the CalendarProperties.MaxDate property.

Example

This example demonstrates how end-user input can be limited by defining a specific date range within the ASPxCalendar control.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="DevExpress.Web.v8.3, Version=8.3.2.0, Culture=neutral, 
PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
</script>

 <html xmlns="http://www.w3.org/1999/xhtml" >
 <head id="Head1" runat="server">
     <title>Max and Min Dates of ASPxCalendar</title>
 </head>
 <body>
     <form id="form1" runat="server">
     <div>
         <br/>
         <dxe:ASPxCalendar ID="ASPxCalendar1" runat="server" MaxDate="2007-08-24" 
         MinDate="2007-08-08" SelectedDate="2007-08-16">
         </dxe:ASPxCalendar>    
     </div>
     </form>
 </body>
 </html>
See Also