private static DateTime? SelectedDateMin(Calendar cal)
{
DateTime selectedDateMin;
if (cal.SelectedDates.Count > 0)
{
selectedDateMin = cal.SelectedDates[0];
Debug.Assert(DateTime.Compare(cal.SelectedDate.Value, selectedDateMin) == 0, "The SelectedDate should be the minimum selected date!");
}
else
{
return null;
}
foreach (DateTime selectedDate in cal.SelectedDates)
{
if (DateTime.Compare(selectedDate, selectedDateMin) < 0)
{
selectedDateMin = selectedDate;
}
}
return selectedDateMin;
}
#endregion DisplayDateStart