-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
🪲 bugProduct bug (most likely)Product bug (most likely)💥 regression-previewRegression from a preview releaseRegression from a preview release
Description
-
.NET Core Version: 5.0.100-preview.1.20125.9
-
Have you experienced this same bug with .NET Framework?:
No
More Info
- This issue cannot reproduce on DateTimePicker.
- This issue cannot reproduce on .Net 3.1.
Minimal repro:
- Create a Winforms Core application.
- Drag and drop a MonthCalendar to the form designer.
- Build and run this application, then double click other date.
Expected behavior:
The date is switched successfully.
Actual behavior:
An exception occurred when MonthCalendar switched dates.
System.ArgumentOutOfRangeException
HResult=0x80131502
Message=Year, Month, and Day parameters describe an un-representable DateTime.
Source=System.Private.CoreLib
StackTrace:
at System.ThrowHelper.ThrowArgumentOutOfRange_BadYearMonthDay()
at System.DateTime..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second)
at System.Windows.Forms.MonthCalendar.MonthCalendarAccessibleObject.GetCalendarRow(Int32 calendarIndex, AccessibleObject parentAccessibleObject, Int32 rowIndex)
at System.Windows.Forms.MonthCalendar.MonthCalendarAccessibleObject.GetCalendarChildAccessibleObject(Int32 calendarIndex, CalendarChildType calendarChildType, AccessibleObject parentAccessibleObject, Int32 index)
at System.Windows.Forms.MonthCalendar.MonthCalendarAccessibleObject.GetCalendarChildAccessibleObject(DateTime selectionStart, DateTime selectionEnd)
at System.Windows.Forms.MonthCalendar.WmDateChanged(Message& m)
at System.Windows.Forms.MonthCalendar.WmReflectCommand(Message& m)
at System.Windows.Forms.MonthCalendar.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)
at Interop.User32.SendMessageW(IHandle hWnd, WM Msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.ReflectMessage(IntPtr hWnd, Message& m)
at System.Windows.Forms.Control.WmNotify(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)
at Interop.User32.CallWindowProcW(IntPtr wndProc, IntPtr hWnd, WM msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)
at Interop.User32.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.Interop.Mso.IMsoComponentManager.FPushMessageLoop(UIntPtr dwComponentID, msoloop uReason, Void* pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WindowsFormsApp2.Program.Main() in C:\Users\v-ruizha\source\repos\WindowsFormsApp2\WindowsFormsApp2\Program.cs:line 20
This exception was originally thrown at this call stack:
[External Code]
WindowsFormsApp2.Program.Main() in Program.cs
Metadata
Metadata
Assignees
Labels
🪲 bugProduct bug (most likely)Product bug (most likely)💥 regression-previewRegression from a preview releaseRegression from a preview release