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

Use DateTime.TryParse instead of TimeSpan.TryParse #3932

Merged
merged 2 commits into from
Oct 7, 2020

Conversation

timunie
Copy link
Collaborator

@timunie timunie commented Oct 6, 2020

Describe the changes you have made to improve this project

In TimePicker DateTimeTryParse instead of TimeSpan.TryParse because TimeSpan.TryParse does not parse time if it has AM or PM notation

Unit test

  • MilitaryTimeShouldBeConvertedToDateTime in DateTimePickerTests

Additional context

Solution taken from here: https://stackoverflow.com/questions/17553738/am-pm-to-timespan

Closed Issues

Closes #3931
Closes #3923

DateTime.TryParse accepts AM and PM
@punker76 punker76 added this to the 2.2.1 milestone Oct 7, 2020
@punker76 punker76 merged commit 1cb79fa into MahApps:develop Oct 7, 2020
@punker76
Copy link
Member

punker76 commented Oct 7, 2020

@timunie your changes have been merged, thanks for your contribution 👍

@timunie timunie deleted the TimePickerFix_AM_PM branch October 8, 2020 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants