dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.22k stars 1.76k forks source link

Datepicker in collectionview header shifts content down when opened on iOS #16160

Open WebGoose opened 1 year ago

WebGoose commented 1 year ago

Description

I have a collectionview with a datepicker in the collectionview header template. When you click on the date picker on iOS, the page content shifts down for some reason. And then when you close the date picker, that white space remains above the collectionview until you scroll around a bit. Then it disappears again. So either the collectionview header is expanding somehow, or the page itself is shifting down? This does not happen on Android.

I have repro'd on 7.0.81 as well as the new 7.0.92 release.

https://github.com/dotnet/maui/assets/5024960/24b8978a-0821-45a3-afbd-ae9071053f18

Steps to Reproduce

Create a new MAUI App. Add a collectionview and put a datepicker inside the header template.

I have also linked to my repo project

Link to public reproduction project repository

https://gooseza.visualstudio.com/MauiBugs/_git/DatePickerInCollectionviewHeader

Version with bug

7.0.81

Last version that worked well

6.0

Affected platforms

iOS

Affected platform versions

iOS 16.5.1

Did you find any workaround?

No

Relevant log output

No response

ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

XamlTest commented 1 year ago

Verified this on Visual Studio Enterprise 17.7.0 Preview 6.0. Repro on iOS 16.4(8.0.100-preview.6.23330.14), not repro on Android 13.0-API33 with below Project: DatePickerExperiments.zip

Carlosperez1001 commented 1 year ago

Any workaround or fix for this?

divyesh008 commented 9 months ago

Facing this same.

leoslima13 commented 8 months ago

It's not happening only on header, I have the same scenario with a DatePicker on CollectionView content. it often happens with Entry well On MAUI latest version 8.0.6

CiDcvgDatePicker

divyesh008 commented 8 months ago

You might be calling DatePicker on some button click, by setting its visibility to false. Instead set the height of DatePicker to 0 and keep visibility true. Give it a try.

leoslima13 commented 8 months ago

@divyesh008 that's the "real" DatePicker, is not a custom control

divyesh008 commented 8 months ago

I think it got resolved in 8.0.7 version