Microsoft.Samples.KMoore.WPFSamples.DateControls.MonthCalendar.IsValidNullableDate C# (CSharp) Method

IsValidNullableDate() private static method

Validate input value in MonthCalendar
private static IsValidNullableDate ( object value ) : bool
value object
return bool
        private static bool IsValidNullableDate(object value)
        {
            DateTime? date = (DateTime?)value;

            return !date.HasValue ||
                MonthCalendarHelper.IsWithinRange(date.Value, CalendarDataGenerator.MinDate, CalendarDataGenerator.MaxDate);
        }