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