A newer version of this page is available. Switch to the current version.

ASPxClientDateEdit.SetMaxDate(date) Method

Sets the maximum date of the editor.

Declaration

SetMaxDate(date: Date): void

Parameters

Name Type Description
date Date

A DateTime object representing the maximum date.

Remarks

Use the ASPxClientDateEdit.SetMinDate method to specify the minimum date on client side. To specify the minimum and maximum dates on the server, use the ASPxDateEdit.MinDate and the ASPxDateEdit.MaxDate properties.

The ASPxClientDateEdit.GetMaxDate and ASPxClientDateEdit.GetMinDate methods are useful to obtain the minimum and maximum dates of the editor.

NOTE

Note that an editor's maximum date value specified by the client SetMaxDate method is not synchronized with the ASPxDateEdit.MaxDate property value.

When the ASPxDateEdit.MaxDate property is assigned on the server, its value is saved in the Control.ViewState. The Control.ViewState is saved on the page in a hidden field and cannot be modified on the client. When a postback is sent, the previous value of the ASPxDateEdit.MaxDate property (saved in ViewState) is applied and a new editor value becomes invalid and is changed to the previous one.

dateEdit.SetMaxDate(new Date("October 18, 2015 11:13:00")); 
See Also