Version

MinDate Property

Gets/sets the minimum date that will be accepted by the control.
Syntax
'Declaration
 
Public Property MinDate As Date
public DateTime MinDate {get; set;}
Remarks

The UltraDateTimeEditor control provides the ability to restrict the range of dates that will be accepted by the control. This is accomplished by setting the MinDate and MaxDate properties.

Example
This example uses the MinDate and MaxDate properties to restrict the range of dates accepted by the control to dates that fall within the current year.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinEditors

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        '	Set the MinDate property to the first day of the current year
        Dim minDate As DateTime = New DateTime(DateTime.Today.Year, 1, 1)

        '	Set the MaxDate property to the last day of the current year
        Dim maxDate As DateTime = New DateTime(DateTime.Today.Year, 12, 31)
    End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinEditors;

		private void button1_Click(object sender, System.EventArgs e)
		{
			//	Set the MinDate property to the first day of the current year
			DateTime minDate = new DateTime( DateTime.Today.Year, 1, 1 );

			//	Set the MaxDate property to the last day of the current year
			DateTime maxDate = new DateTime( DateTime.Today.Year, 12, 31 );
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also