-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add AllowTapRangeSelection for Calendar #19367
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
Conversation
You can test this PR using the following package version. |
API diff for review: namespace Avalonia.Controls
{
public class Calendar : TemplatedControl
{
+ public static readonly StyledProperty<bool> AllowTapRangeSelectionProperty;
+ public bool AllowTapRangeSelection { get; set; }
}
} |
The API is approved, but we want it |
@drasticactions The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
You can test this PR using the following package version. |
* Add AllowTapRangeSelection for Calendar * Fix spacing * Let it be true... * Update CalendarTests.cs
What does the pull request do?
Adds a new API to Calendar to allow tapping twice to select a range of dates.
What is the current behavior?
Date selection ranges are done using keyboard shortcuts, which does not work on mobile.
What is the updated/expected behavior with this PR?
This PR introduces a new
AllowTapRangeSelection
feature, enabling users to tap once to select an initial date and tap again to choose the second. It only works forSingleRange
mode. If you haveMultipleRange
selected, it will work for the first range, then reset for the second.I've added the boolean to preserve the existing keyboard functions for users who expect a new start date when clicking, ensuring the original functions remain intact. This is intended as a stopgap measure while we research different ways of handling more advance features in the future.