PartialSheet icon indicating copy to clipboard operation
PartialSheet copied to clipboard

Buttons not working in DatePicker with .datePickerStyle(.graphical)

Open liangwangcm opened this issue 3 years ago • 0 comments

This is mentioned in https://github.com/AndreaMiotto/PartialSheet/issues/65. To be accurate, it's here

I have looked a bit more into it and it is indeed the dragGesture that takes over the whole view. In some cases it can be fixed by just adding an onTapGesture {} to your view/button/picker but this does not work the DatePicker - then buttons stops to work.

How to reproduce

Use the builtin example DatePickerExample and update

DatePicker("Date", selection: $date)

to

DatePicker("Date", selection: $date)
                    .datePickerStyle(.graphical)

https://user-images.githubusercontent.com/103400893/176579938-a6497256-bf4f-4982-a5ee-e857e49f9d00.mp4

liangwangcm avatar Jun 30 '22 01:06 liangwangcm