https://bugzilla.novell.com/show_bug.cgi?id=362117
User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=362117#c2 Andy Hume <[EMAIL PROTECTED]> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|MonthCalendar's SelectionRange object default |MonthCalendar's SelectionRange object |constructor wrong end datetime |constructor issues --- Comment #2 from Andy Hume <[EMAIL PROTECTED]> 2008-02-18 09:13:13 MST --- I found while investigating bug 362749, that an time component of the DateTimes passed to the other constructor are stripped. Full set of unit-tests attached. Changing title to cover both constructors, was: "MonthCalendar's SelectionRange object default constructor wrong end datetime". Patch is: [[ Index: SelectionRange.cs =================================================================== --- SelectionRange.cs (revision 96031) +++ SelectionRange.cs (working copy) @@ -40,6 +40,8 @@ // default parameterless construcor, use default values public SelectionRange () { + end = DateTime.MaxValue.Date; + start = DateTime.MinValue.Date; } // constructor that receives another range, copies it's Start and End values @@ -51,11 +53,11 @@ // constructor that receives two dates, uses the lower of the two as start public SelectionRange (DateTime lower, DateTime upper) { if (lower <= upper) { - end = upper; - start = lower; + end = upper.Date; + start = lower.Date; } else { - end = lower; - start = upper; + end = lower.Date; + start = upper.Date; } } ]] -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
