DateTimePicker.MinDate

Syntax

MinDate: Date

Description

The MinDate property sets the minimun available value of date for the component.

Comments

The month value belongs to the range from zero to eleven.

Example

To execute the example, create a time and date editor (see Example of Creating the DateTimePicker Component). Create the variables that contains the minimal and the maximal date.

var minDate = new Date (2010, 08, 29, 11, 0, 0, 0);

var maxDate = new Date (2012, 11, 31, 20, 0, 0, 0);

 

Set the variable as the value for the MinDate and MaxDate properties:

MinDate: minDate,

MaxDate: maxDate

 

After executing the example the calendar is available from 29/09/2010 to 31/12/2012 inclusive. This constraint is relevant for all display modes.

On setting the date value that exceeds the constraint limits to the input box then the indicator of incorrect entry is enabled and the component sets the minimal and maximal available value when the focus is lost.

See also:

DateTimePicker