バージョン

MinDate プロパティ (UltraCalendarInfo)

許容される最小の日付を設定します。
シンタックス
'宣言
 
Public Property MinDate As Date
public DateTime MinDate {get; set;}
使用例
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.IO
Imports System.Globalization

    Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click

        '	現在の年を取得します
        Dim currentYear As Integer = DateTime.Today.Date.Year

        '	現在のカルチャーのカレンダーに基づいて年の月数を取得します
        Dim numberOfMonthsInYear As Integer = System.Globalization.CultureInfo.CurrentCulture.Calendar.GetMonthsInYear(currentYear)

        '	年の最後の月にある日数を取得します
        Dim month As Infragistics.Win.UltraWinSchedule.Month = Me.ultraCalendarInfo1.GetMonth(numberOfMonthsInYear, currentYear)
        Dim numberOfDaysInMonth As Integer = month.DaysInMonth

        '	MinDate プロパティを現在の年の最初の日に設定します
        Me.ultraCalendarInfo1.MinDate = New DateTime(currentYear, 1, 1)

        '	MaxDate プロパティを現在の年の最後の日に設定します
        Me.ultraCalendarInfo1.MaxDate = New DateTime(currentYear, numberOfMonthsInYear, numberOfDaysInMonth)

    End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.IO;
using System.Globalization;

		private void button1_Click(object sender, System.EventArgs e)
		{

			//	現在の年を取得します
			int currentYear = DateTime.Today.Date.Year;

			//	現在のカルチャーのカレンダーに基づいて年の月数を取得します
			int numberOfMonthsInYear = System.Globalization.CultureInfo.CurrentCulture.Calendar.GetMonthsInYear( currentYear );

			//	年の最後の月にある日数を取得します
			Infragistics.Win.UltraWinSchedule.Month month = this.ultraCalendarInfo1.GetMonth( numberOfMonthsInYear, currentYear );
			int numberOfDaysInMonth = month.DaysInMonth;
			
			//	MinDate プロパティを現在の年の最初日に設定します
			this.ultraCalendarInfo1.MinDate = new DateTime( currentYear, 1, 1 );

			//	MaxDate プロパティを現在の年の最後の日に設定します
			this.ultraCalendarInfo1.MaxDate = new DateTime( currentYear, numberOfMonthsInYear, numberOfDaysInMonth );
		
		}
参照