Skip to content

fix: GoToDate crash on non-English locales (5.1.1)#332

Closed
mscrivo wants to merge 3 commits into
mainfrom
fix/date-locale-gotodate
Closed

fix: GoToDate crash on non-English locales (5.1.1)#332
mscrivo wants to merge 3 commits into
mainfrom
fix/date-locale-gotodate

Conversation

@mscrivo

@mscrivo mscrivo commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Problem

A German user reported a crash (DISP_E_TYPEMISMATCH, 0x80020005) when clicking the calendar Next/Previous navigation arrows.

The Next/Previous handlers formatted the target date with CultureInfo.CurrentCulture before passing it to the Outlook View Control's GoToDate. On non-English locales (e.g. de-DE producing 10.07.2026) the control cannot parse the string and throws a type-mismatch COM exception. It works on en-US because that produces MM/DD/YYYY.

Fix

Format with CultureInfo.InvariantCulture in both handlers, matching the already-correct call in SetCurrentViewControlAsActiveIfNecessary.

  • OotD.Core/Forms/MainForm.cs — ButtonPrevious_Click, ButtonNext_Click

Also bumps version.txt to 5.1.1 for the release.

mscrivo added 3 commits July 11, 2026 15:28
…locale crash

The Next/Previous calendar navigation buttons formatted the target date
with CurrentCulture before passing it to the Outlook View Control's
GoToDate. On non-English locales (e.g. de-DE producing 10.07.2026) the
control could not parse the string and threw DISP_E_TYPEMISMATCH
(0x80020005). Format with InvariantCulture to match the already-correct
path in SetCurrentViewControlAsActiveIfNecessary.
@mscrivo

mscrivo commented Jul 11, 2026

Copy link
Copy Markdown
Owner Author

Merging directly to main instead.

@mscrivo mscrivo closed this Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant