19 writes to MinDate
System.Windows.Forms (1)
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1618private void ResetMinDate() => MinDate = DateTime.MinValue;
System.Windows.Forms.Tests (15)
System\Windows\Forms\AccessibleObjects\MonthCalendar.MonthCalendarAccessibleObjectTests.cs (1)
133monthCalendar.MinDate = minDate;
System\Windows\Forms\MonthCalendarTests.cs (14)
1167MinDate = new DateTime(2019, 1, 2, 3, 4, 5, 6), 1457MinDate = value 1465calendar.MinDate = value; 1485calendar.MinDate = value; 1495calendar.MinDate = value; 1509Assert.Throws<ArgumentOutOfRangeException>("value", () => calendar.MinDate = calendar.MaxDate.AddTicks(1)); 1516Assert.Throws<ArgumentOutOfRangeException>("value", () => calendar.MinDate = calendar.MinDate.AddTicks(-1)); 2010calendar.MinDate = new DateTime(2019, 10, 3); 2091calendar.MinDate = new DateTime(2019, 10, 3); 2206calendar.MinDate = new DateTime(2019, 10, 3); 2910calendar.MinDate = new DateTime(2019, 10, 3); 4026calendar.MinDate = new DateTime(2019, 10, 3); 4137calendar.MinDate = new DateTime(2019, 10, 3); 4519ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeMinDate(), () => calendar.MinDate = DateTime.Now);
System.Windows.Forms.UI.IntegrationTests (1)
MonthCalendarTests.cs (1)
209MinDate = s_minDate,
WinFormsControlsTest (2)
Calendar.cs (2)
42monthCalendar1.MinDate = minDateDateTimePicker.Value; 63monthCalendar1.MinDate = MinimumDateTime;
46 references to MinDate
System.Windows.Forms (2)
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
647ArgumentOutOfRangeException.ThrowIfLessThan(value, MinDate);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (1)
471internal DateTime MinDate => this.TryGetOwnerAs(out MonthCalendar? owner) ? owner.MinDate : DateTime.MinValue;
System.Windows.Forms.Tests (43)
System\Windows\Forms\MonthCalendarTests.cs (43)
98Assert.Equal(new DateTime(1753, 1, 1), control.MinDate); 1376Assert.Throws<ArgumentOutOfRangeException>("value", () => calendar.MaxDate = calendar.MinDate.AddTicks(-1)); 1459Assert.Equal(expected, calendar.MinDate); 1466Assert.Equal(expected, calendar.MinDate); 1486Assert.Equal(expected, calendar.MinDate); 1496Assert.Equal(expected, calendar.MinDate); 1516Assert.Throws<ArgumentOutOfRangeException>("value", () => calendar.MinDate = calendar.MinDate.AddTicks(-1)); 2007calendar.SelectionStart = calendar.MinDate.AddTicks(-1); 2008Assert.Equal(calendar.MinDate.AddTicks(-1), calendar.SelectionStart); 2011Assert.Throws<ArgumentOutOfRangeException>("value", () => calendar.SelectionStart = calendar.MinDate.AddTicks(-1)); 2089Assert.Throws<ArgumentOutOfRangeException>("value", () => calendar.SelectionEnd = calendar.MinDate.AddTicks(-1)); 2092Assert.Throws<ArgumentOutOfRangeException>("value", () => calendar.SelectionEnd = calendar.MinDate.AddTicks(-1)); 2198calendar.SelectionRange = new SelectionRange(calendar.MinDate.AddTicks(-1), calendar.MinDate); 2199Assert.Equal(calendar.MinDate.AddTicks(-1).Date, calendar.SelectionStart); 2200Assert.Equal(calendar.MinDate, calendar.SelectionEnd); 2202calendar.SelectionRange = new SelectionRange(calendar.MinDate, calendar.MinDate.AddTicks(-1)); 2203Assert.Equal(calendar.MinDate.AddTicks(-1).Date, calendar.SelectionStart); 2204Assert.Equal(calendar.MinDate, calendar.SelectionEnd); 2207Assert.Throws<ArgumentOutOfRangeException>("date1", () => calendar.SelectionRange = new SelectionRange(calendar.MinDate.AddTicks(-1), calendar.MinDate)); 2208Assert.Throws<ArgumentOutOfRangeException>("date1", () => calendar.SelectionRange = new SelectionRange(calendar.MinDate, calendar.MinDate.AddTicks(-1))); 2907calendar.TodayDate = calendar.MinDate.AddTicks(-1); 2908Assert.Equal(calendar.MinDate.AddTicks(-1).Date, calendar.TodayDate); 2911Assert.Throws<ArgumentOutOfRangeException>("value", () => calendar.TodayDate = calendar.MinDate.AddTicks(-1)); 4022calendar.SetDate(calendar.MinDate.AddTicks(-1)); 4023Assert.Equal(calendar.MinDate.AddTicks(-1), calendar.SelectionStart); 4024Assert.Equal(calendar.MinDate.AddTicks(-1), calendar.SelectionEnd); 4027Assert.Throws<ArgumentOutOfRangeException>("date", () => calendar.SetDate(calendar.MinDate.AddTicks(-1))); 4129calendar.SetSelectionRange(calendar.MinDate.AddTicks(-1), calendar.MinDate); 4130Assert.Equal(calendar.MinDate.AddTicks(-1), calendar.SelectionStart); 4131Assert.Equal(calendar.MinDate, calendar.SelectionEnd); 4133calendar.SetSelectionRange(calendar.MinDate, calendar.MinDate.AddTicks(-1)); 4134Assert.Equal(calendar.MinDate, calendar.SelectionStart); 4135Assert.Equal(calendar.MinDate, calendar.SelectionEnd); 4138Assert.Throws<ArgumentOutOfRangeException>("date1", () => calendar.SetSelectionRange(calendar.MinDate.AddTicks(-1), calendar.MinDate)); 4139Assert.Throws<ArgumentOutOfRangeException>("date2", () => calendar.SetSelectionRange(calendar.MinDate, calendar.MinDate.AddTicks(-1)));
WinFormsControlsTest (1)
Calendar.cs (1)
47if (maxDateDateTimePicker.Value < monthCalendar1.MinDate)