In the documentation for the calendar "SelectionChanged" event it states;
A ValueChangedEventArgs<object> object which provides old and new value of the SelectedDate. The values are of type object, but can be cast to the DateTime type.
The values are actually doubles and when the control is first bound (prior to the SelectionDate being set) my "SelectionChanged" handler is called with the following values;
If I attempt to convert either of the values using "Convert.ToDateTime(args.<value>)" I get the exception "Invalid cast from 'Double' to 'DateTime'".
If I attempt to convert the old value using "DateTime.FromOADate(args.args.OldValue)" I get the exception "Not a legal OleAut date".
And if I attempt to convert the old value using "TimeSpan.FromSeconds(args.OldValue)" I get the exception "TimeSpan overflowed because the duration is too long".
Can you clarify;
1) Exactly what "date" values are being passed in the ValueChangedEventArgs, and
2) What is the correct way to convert these to DateTime values.