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 date picker dismissing when tapping on date picker in .inline style #551

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

joeboyscout04
Copy link

Fixes #532 .

It looks like the issue was introduced in #528, where the tap gesture was moved to the window. The action sheet itself also needs to be exempted from the dismissal tap gesture to work with a datePickerStyle = .inline.

@noorulain17
Copy link
Collaborator

Thanks for the contribution @joeboyscout04 🎉
Please share a video representing the fix with all datePickerStyles

@joeboyscout04
Copy link
Author

Here's some videos which I took showing the results. Please forgive the low video quality, I had to compress them pretty hard as I can only upload max 10mb videos here at Github. I modified the demo project to do the testing.

Here's the original behavior. Note that in .compact and .inline styles, tapping some date dismisses the picker rather than selecting the date.

Old_behavior.mov

In the new behavior, you should be able to select a date in all datePickerStyles

New_behavior_iphone.mov

Here's the new behavior on iPad (popover).

New_behavior_ipad.mov

@Wei18
Copy link
Collaborator

Wei18 commented Feb 5, 2024

@joeboyscout04
Thanks! 🎉

@Wei18 Wei18 self-requested a review February 5, 2024 17:04
@Wei18 Wei18 merged commit 1a9bbee into skywinder:develop Feb 5, 2024
@mlch911
Copy link

mlch911 commented Mar 16, 2024

There would be a problem when the superview is not full-screen size.
We can disable the gesture in gestureRecognizerShouldBegin:.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SWActionSheetVC.dismissTap prevents calendar from working in inline style
4 participants