Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatePicker appears to interpret DayFormat as a .NET DateTime format string when it shouldn't #4757

Open
PathogenDavid opened this issue Sep 28, 2020 · 2 comments

Comments

@PathogenDavid
Copy link
Contributor

Environment

Observed with XamlControlsGallery (with both 0.10.0-preview5 and the latest Avalonia CI build.)

Windows 10 2004

The Problem

The DatePicker control appears to be incorrectly using its DayFormat as a .NET DateTime format string:

image

I did not modify the example XAML, but here it is for reference:

<DatePicker x:Name="Control2" DayFormat="{}{day.integer} ({dayofweek.abbreviated})"
                               YearVisible="False" />
@amwx
Copy link
Contributor

amwx commented Sep 28, 2020

This is either a copy pasta mistake from the actual WinUI controls gallery or was created from a very early version of the DatePicker PR when I had originally tried to keep the WinUI formatting style (which was removed by request)
@danwalmsley

DatePicker Day/Month/YearFormat properties require the format to be in normal .net datetime formatting, for example for the equivalent from winui (from above) it would be DayFormat="d (ddd)"

@PathogenDavid
Copy link
Contributor Author

In that case this issue should probably be moved to https://github.com/AvaloniaUI/XamlControlsGallery/ and reworded to fix the example.

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

No branches or pull requests

2 participants