summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2987.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2987.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2987.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2987.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2987.cs
new file mode 100644
index 00000000..770320b0
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2987.cs
@@ -0,0 +1,39 @@
+´╗┐using System;
+using Xamarin.Forms.CustomAttributes;
+using System.Diagnostics;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2987, "When setting the minimum and maximum date for a date picker, only allow valid dates to be seen/selected from the DatePicker dialog", PlatformAffected.Android)]
+ public class Issue2987 : TestContentPage
+ {
+ public AbsoluteLayout layout;
+
+ protected override void Init ()
+ {
+ var datePicker = new DatePicker { AutomationId = "datePicker" };
+ datePicker.MinimumDate = new DateTime (2015, 1, 1);
+ datePicker.MaximumDate = new DateTime (2015, 6, 1);
+ datePicker.Date = DateTime.Now;
+ datePicker.Format = "MMM dd, yyyy";
+ datePicker.DateSelected += (object sender, DateChangedEventArgs e) => {
+ Debug.WriteLine ("Date changed");
+ };
+
+ Padding = new Thickness (10, Device.OnPlatform (20, 0, 0), 10, 5);
+
+ layout = new AbsoluteLayout {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand
+ };
+
+ AbsoluteLayout.SetLayoutFlags (datePicker, AbsoluteLayoutFlags.None);
+ AbsoluteLayout.SetLayoutBounds (datePicker, new Rectangle (0f, 0f, 300f, 50f));
+
+ layout.Children.Add (datePicker);
+
+ Content = layout;
+ }
+ }
+}