microsoft / microsoft/microsoft-ui-xaml
Wrong Regional Formatting on CalendarDatePicker in packaged app vs unpackaged AppSDK 1.6
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
After upgrading to AppSDK 1.6, I found that CalendarDatePicker is now correctly rendering dates according to region settings, but only in an unpackaged app.
In a Packaged app, the regional formatting is incorrectly being pulled from the UI display language, rather than the regional setting.
- System language is `English (United States)`
- Country/Region is `United States`
- Regional settings are `German (Germany)`
- I've overridden the short date format to `YYYY-MM-dd`

In a sample app with only a ``, I see different results when running the app packaged vs unpackaged:
Unpackaged (correct):

Packaged (incorrect):

You can see this incorrect behaviour in the Gallery app, as well
I can reproduce this behaviour both on Windows 10 and Windows 11
### Steps to reproduce the bug
Create a CalendarDatePicker
### Expected behavior
The picker should display dates in the user's regional formatting (`YYYY-MM-dd` in this case), whether packaged or unpackaged
### Screenshots
Unpackaged (correct):

Packaged (incorrect):

### NuGet package version
WinUI 3 - Windows App SDK 1.6.0: 1.6.240829007
### Windows version
Windows 11 (22H2): Build 22621, Windows 10 (21H2): Build 19044
### Additional context
_No response_
Contributor guide
Research direction
Start with the CalendarDatePicker behavior in the Windows App SDK 1.6 sample described in the issue, reproducing it in both packaged and unpackaged configurations. Compare the regional formatting results against the stated Windows regional settings; done means both configurations display the overridden YYYY-MM-dd format rather than the UI display language format.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100