Bug 17762 - When displaying a MT.D containing a Date as a FormSheet, the DatePicker is cropped/unusable
Summary: When displaying a MT.D containing a Date as a FormSheet, the DatePicker is cr...
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: master
Hardware: Macintosh Mac OS
: Normal enhancement
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-02-13 17:01 UTC by Jason Awbrey
Modified: 2014-02-25 14:30 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

screenshot showing issue (107.66 KB, image/png)
2014-02-13 17:01 UTC, Jason Awbrey

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 17762 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Jason Awbrey 2014-02-13 17:01:10 UTC
Created attachment 6041 [details]
screenshot showing issue

When displaying a MonoTouch.Dialog containing a Date element within a FormSheet, the resulting DatePicker is cropped and unusable (see attachment).

There is also a thread here with a sample from another user attached:


WOFilter filter = new WOFilter ();
BindingContext context = new BindingContext (null, filter, "Filter");
DialogViewController dvc = new DialogViewController (context.Root, true);
UINavigationController nav = new UINavigationController (dvc);
nav.ModalPresentationStyle = UIModalPresentationStyle.FormSheet;
PresentViewController (nav, true, null);

	public class WOFilter {

		[Caption("Start Date")]
		public DateTime StartDate;

		[Caption("End Date")]
		public DateTime EndDate;
Comment 1 Rolf Bjarne Kvinge [MSFT] 2014-02-14 03:44:38 UTC
Could you add your full version information from Xamarin Studio's About menu (show when you click 'Details')?
Comment 2 Jason Awbrey 2014-02-14 09:27:36 UTC
Xamarin Studio
Version 4.3.2 (build 2)
Installation UUID: b4ee4ab9-199c-40ea-898b-7a101a9fc482
	Mono 3.2.6 ((no/9b58377)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 302060000

Apple Developer Tools
Xcode 5.0.2 (3335.32)
Build 5A3005

Version: (Enterprise Edition)
Hash: 2ed9bc9
Build date: 2014-21-01 06:33:05-0500

Version: 4.12.0 (Enterprise Edition)
Android SDK: /Users/jason/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

Xamarin.Mac: Not Installed

Build Information
Release ID: 403020002
Git revision: b442e89c84c5d1770cea90b2d69ac5e60907c578
Build date: 2014-01-30 23:06:32+0000
Xamarin addins: d8f15d9aac741cd301f6b14904d68632b0330b71

Operating System
Mac OS X 10.9.1
Darwin Jason-Awbreys-MacBook-Pro.local 13.0.0 Darwin Kernel Version 13.0.0
    Thu Sep 19 22:22:27 PDT 2013
    root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
Comment 3 Jason Awbrey 2014-02-18 20:50:22 UTC
Any suggestions for a workaround or fix for this?
Comment 4 Sebastien Pouliot 2014-02-25 14:30:24 UTC
DateTimeElement does not support this scenario. PickerFrameWithSize is computing the position based on UIScreen.MainScreen.ApplicationFrame - but that's not the situation you want (it should be computed based on the modal dialog being shown).

The workaround is to subclass DateElement and override the CreatePicker and Selected methods.