20 writes to MaxDate
System.Windows.Forms (1)
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1612
private void ResetMaxDate() =>
MaxDate
= DateTime.MaxValue;
System.Windows.Forms.Tests (16)
System\Windows\Forms\AccessibleObjects\MonthCalendar.MonthCalendarAccessibleObjectTests.cs (1)
145
monthCalendar.
MaxDate
= maxDate;
System\Windows\Forms\MonthCalendarTests.cs (15)
1168
MaxDate
= new DateTime(2020, 2, 3, 4, 5, 6, 7)
1324
MaxDate
= value
1332
calendar.
MaxDate
= value;
1352
calendar.
MaxDate
= value;
1362
calendar.
MaxDate
= value;
1376
Assert.Throws<ArgumentOutOfRangeException>("value", () => calendar.
MaxDate
= calendar.MinDate.AddTicks(-1));
2021
calendar.
MaxDate
= new DateTime(2019, 9, 3);
2101
calendar.
MaxDate
= new DateTime(2019, 9, 3);
2223
calendar.
MaxDate
= new DateTime(2019, 9, 3);
2921
calendar.
MaxDate
= new DateTime(2019, 9, 3);
4038
calendar.
MaxDate
= new DateTime(2019, 9, 3);
4154
calendar.
MaxDate
= new DateTime(2019, 9, 3);
4512
calendar.
MaxDate
= DateTime.MaxValue;
4518
ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeMaxDate(), () => calendar.
MaxDate
= DateTime.Now.AddYears(2));
4665
calendar.
MaxDate
= new DateTime(2022, 12, 31);
System.Windows.Forms.UI.IntegrationTests (1)
MonthCalendarTests.cs (1)
210
MaxDate
= s_maxDate
WinFormsControlsTest (2)
Calendar.cs (2)
53
monthCalendar1.
MaxDate
= maxDateDateTimePicker.Value;
68
monthCalendar1.
MaxDate
= MaximumDateTime;
46 references to MaxDate
System.Windows.Forms (2)
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
648
ArgumentOutOfRangeException.ThrowIfGreaterThan(value,
MaxDate
);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (1)
471
internal DateTime MaxDate => this.TryGetOwnerAs(out MonthCalendar? owner) ? owner.
MaxDate
: DateTime.MaxValue;
System.Windows.Forms.Tests (43)
System\Windows\Forms\MonthCalendarTests.cs (43)
95
Assert.Equal(new DateTime(9998, 12, 31), control.
MaxDate
);
1326
Assert.Equal(expected, calendar.
MaxDate
);
1333
Assert.Equal(expected, calendar.
MaxDate
);
1353
Assert.Equal(expected, calendar.
MaxDate
);
1363
Assert.Equal(expected, calendar.
MaxDate
);
1509
Assert.Throws<ArgumentOutOfRangeException>("value", () => calendar.MinDate = calendar.
MaxDate
.AddTicks(1));
2018
calendar.SelectionStart = calendar.
MaxDate
.AddTicks(1);
2019
Assert.Equal(calendar.
MaxDate
.AddTicks(1), calendar.SelectionStart);
2022
Assert.Throws<ArgumentOutOfRangeException>("value", () => calendar.SelectionStart = calendar.
MaxDate
.AddTicks(1));
2099
Assert.Throws<ArgumentOutOfRangeException>("value", () => calendar.SelectionEnd = calendar.
MaxDate
.AddTicks(1));
2102
Assert.Throws<ArgumentOutOfRangeException>("value", () => calendar.SelectionEnd = calendar.
MaxDate
.AddTicks(1));
2215
calendar.SelectionRange = new SelectionRange(calendar.
MaxDate
.AddTicks(1), calendar.
MaxDate
);
2216
Assert.Equal(calendar.
MaxDate
, calendar.SelectionStart);
2217
Assert.Equal(calendar.
MaxDate
.AddTicks(1).Date, calendar.SelectionEnd);
2219
calendar.SelectionRange = new SelectionRange(calendar.
MaxDate
, calendar.
MaxDate
.AddTicks(1));
2220
Assert.Equal(calendar.
MaxDate
, calendar.SelectionStart);
2221
Assert.Equal(calendar.
MaxDate
.AddTicks(1).Date, calendar.SelectionEnd);
2224
Assert.Throws<ArgumentOutOfRangeException>("date2", () => calendar.SelectionRange = new SelectionRange(calendar.
MaxDate
.AddDays(1), calendar.
MaxDate
));
2225
Assert.Throws<ArgumentOutOfRangeException>("date2", () => calendar.SelectionRange = new SelectionRange(calendar.
MaxDate
, calendar.
MaxDate
.AddDays(1)));
2918
calendar.TodayDate = calendar.
MaxDate
.AddTicks(1);
2919
Assert.Equal(calendar.
MaxDate
.AddTicks(1).Date, calendar.TodayDate);
2922
Assert.Throws<ArgumentOutOfRangeException>("value", () => calendar.TodayDate = calendar.
MaxDate
.AddDays(1));
4034
calendar.SetDate(calendar.
MaxDate
.AddTicks(1));
4035
Assert.Equal(calendar.
MaxDate
.AddTicks(1), calendar.SelectionStart);
4036
Assert.Equal(calendar.
MaxDate
.AddTicks(1), calendar.SelectionEnd);
4039
Assert.Throws<ArgumentOutOfRangeException>("date", () => calendar.SetDate(calendar.
MaxDate
.AddDays(1)));
4146
calendar.SetSelectionRange(calendar.
MaxDate
.AddTicks(1), calendar.
MaxDate
);
4147
Assert.Equal(calendar.
MaxDate
.AddTicks(1), calendar.SelectionStart);
4148
Assert.Equal(calendar.
MaxDate
.AddTicks(1), calendar.SelectionEnd);
4150
calendar.SetSelectionRange(calendar.
MaxDate
, calendar.
MaxDate
.AddTicks(1));
4151
Assert.Equal(calendar.
MaxDate
, calendar.SelectionStart);
4152
Assert.Equal(calendar.
MaxDate
.AddTicks(1), calendar.SelectionEnd);
4155
Assert.Throws<ArgumentOutOfRangeException>("date1", () => calendar.SetSelectionRange(calendar.
MaxDate
.AddDays(1), calendar.
MaxDate
));
4156
Assert.Throws<ArgumentOutOfRangeException>("date2", () => calendar.SetSelectionRange(calendar.
MaxDate
, calendar.
MaxDate
.AddDays(1)));
4669
calendar.
MaxDate
.Should().Be(new DateTime(9998, 12, 31));
WinFormsControlsTest (1)
Calendar.cs (1)
36
if (minDateDateTimePicker.Value > monthCalendar1.
MaxDate
)