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 DateTimePicker scroll down #13482

Merged

Conversation

maprosen
Copy link
Contributor

@maprosen maprosen commented Nov 3, 2023

What does the pull request do?

This PR fixes bug on down button in the Time/Date pickers.

What is the current behavior?

Currently if you press the down button in the AM/PM designator it will go blank.
If you scroll to the end of the year part in the DatePicker, the down button will stop selecting at some point.

TimePickerProblem1
TimePickerProblem2

The possible scroll height is calculated like in the standard scroll viewer, but in this case we can go beyond the viewport height in order to select the last items.

What is the updated/expected behavior with this PR?

Down button should select the next item up till the end.

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

The scroll height should be extent heght minus item height. This will allow it to scroll up to the last item.

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

@maxkatz6 maxkatz6 added this pull request to the merge queue Nov 3, 2023
Merged via the queue into AvaloniaUI:master with commit 083c7cb Nov 3, 2023
6 checks passed
@maxkatz6 maxkatz6 added the backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch label Nov 5, 2023
maxkatz6 pushed a commit that referenced this pull request Dec 5, 2023
@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.

2 participants