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

Fix TimePicker empty designator on 12 hour clock #13469

Merged

Conversation

maprosen
Copy link
Contributor

@maprosen maprosen commented Nov 2, 2023

What does the pull request do?

This PR ensures that the PM/AM designator on the timepicker will be visible even if the current culture designators are empty.
As per documentation https://learn.microsoft.com/en-us/dotnet/api/system.globalization.datetimeformatinfo.amdesignator?view=net-7.0 , the designators could return an empty string.

What is the current behavior?

Currently, if the current culture designator is empty and the TimePicker property is set to 12 hour type, it will show empty boxes with no text.
image

What is the updated/expected behavior with this PR?

If the current culture info PM/AM designators are empty, take the PM/AM designator from the invariant culture.

Checklist

@maprosen
Copy link
Contributor Author

maprosen commented Nov 2, 2023

@dotnet-policy-service agree

@maxkatz6 maxkatz6 added this pull request to the merge queue Nov 12, 2023
Merged via the queue into AvaloniaUI:master with commit f6c5720 Nov 12, 2023
6 checks passed
@maxkatz6 maxkatz6 added the backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch label Nov 28, 2023
maxkatz6 pushed a commit that referenced this pull request Dec 5, 2023
* Test - On empty PM/AM designator on culture info the time picker should show AM/PM

* On empty PM/AM designator on culture info the time picker should show AM/PM
@maxkatz6 maxkatz6 added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants