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

CalendarDatePicker - use CustomDateFormatString for parsing the text input #17465

Conversation

punker76
Copy link
Contributor

What does the pull request do?

This PR looks for possible existing CustomDateFormatString and use it for parsing text input. Also the watermark will use now the CustomDateFormatString.

What is the current behavior?

The CustomDateFormatString is ignored and will also throw exceptions. See #17291

What is the updated/expected behavior with this PR?

Now exception is throen and the text is parsed to the excpected DateTime.

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

Fixes #17291

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053193-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@punker76 punker76 force-pushed the fixes/17291-use-customdatastringformat-for-text-input branch from 97e3394 to 3ece70e Compare November 10, 2024 16:31
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053199-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@punker76 punker76 force-pushed the fixes/17291-use-customdatastringformat-for-text-input branch from 3ece70e to 464e85e Compare November 12, 2024 17:41
Copy link
Member

@MrJul MrJul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A missing condition aside, this looks good, thank you!

@punker76 punker76 force-pushed the fixes/17291-use-customdatastringformat-for-text-input branch from 464e85e to ef813e2 Compare November 13, 2024 07:40
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053256-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@punker76 punker76 requested a review from MrJul November 13, 2024 16:51
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053262-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added bug backport-candidate-11.2.x Consider this PR for backporting to 11.2 branch labels Nov 14, 2024
@maxkatz6 maxkatz6 merged commit 9fb3a13 into AvaloniaUI:master Nov 14, 2024
11 checks passed
maxkatz6 pushed a commit that referenced this pull request Nov 14, 2024
…input (#17465)

* fix: #17291 use CustomDateFormatString for parsing the text input

* fix: use CustomDateFormatString also for watermark

* fix: #17291 check also for SelectedDateFormat == Custom
@maxkatz6 maxkatz6 added backported-11.2.x and removed backport-candidate-11.2.x Consider this PR for backporting to 11.2 branch labels Nov 14, 2024
@punker76 punker76 deleted the fixes/17291-use-customdatastringformat-for-text-input branch November 15, 2024 22:40
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.

CustomDateFormatString is not used for text input in CalendarDatePicker
4 participants