public override IDisposable DatePrompt(DatePromptConfig config)
        {
            var date = new DateTimeView()
            {
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions   = LayoutOptions.Center,
                MaximumDate       = config.MaximumDate ?? new DateTime(2030, 12, 31),
                MinimumDate       = config.MinimumDate ?? new DateTime(2017, 1, 1),
                DateTime          = config.SelectedDate ?? DateTime.Now,
                DisplayFormat     = "%F",
            };
            XButton positive = new XButton()
            {
                Text = config.OkText
            };
            XButton negative = new XButton()
            {
                Text = config.CancelText
            };
            var layout = new StackLayout
            {
                Children =
                {
                    date,
                },
            };
            var dialog = new Dialog()
            {
                Title = config.Title,
                //Subtitle = config.Message,
                Content          = layout,
                HorizontalOption = LayoutOptions.Center,
                VerticalOption   = LayoutOptions.Center,
                Negative         = negative,
                Positive         = positive
            };

            dialog.OutsideClicked += (s, e) =>
            {
                dialog.Hide();
            };
            positive.Clicked += (s, e) =>
            {
                dialog.Hide();
                config.OnAction?.Invoke(new DatePromptResult(true, date.DateTime));
            };
            negative.Clicked += (s, e) =>
            {
                dialog.Hide();
                config.OnAction?.Invoke(new DatePromptResult(false, date.DateTime));
            };
            return(Show(dialog));
        }
        public override IDisposable TimePrompt(TimePromptConfig config)
        {
            var time = new DateTimeView()
            {
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions   = LayoutOptions.Center,
                DateTime          = config.SelectedTime != null?DateTime.Today.Add((TimeSpan)config.SelectedTime) : DateTime.Now,
            };
            var positive = new XButton
            {
                Text = config.OkText
            };
            var negative = new XButton
            {
                Text = config.CancelText
            };
            var layout = new StackLayout
            {
                Children =
                {
                    time
                },
                Padding = 30
            };

            if (config.Use24HourClock == null)
            {
                time.DisplayFormat = "%T";
            }
            else
            {
                if (config.Use24HourClock.Value)
                {
                    time.DisplayFormat = "%p %T";
                }
                else
                {
                    time.DisplayFormat = "%T";
                }
            }
            var dialog = new Dialog()
            {
                Title = config.Title,
                //Subtitle = config.Message,
                Content          = layout,
                HorizontalOption = LayoutOptions.Center,
                VerticalOption   = LayoutOptions.Center,
                Negative         = negative,
                Positive         = positive
            };

            dialog.OutsideClicked += (s, e) =>
            {
                dialog.Hide();
            };
            positive.Clicked += (s, e) =>
            {
                dialog.Hide();
                config.OnAction?.Invoke(new TimePromptResult(true, time.DateTime.TimeOfDay));
            };
            negative.Clicked += (s, e) =>
            {
                dialog.Hide();
                config.OnAction?.Invoke(new TimePromptResult(false, time.DateTime.TimeOfDay));
            };
            return(Show(dialog));
        }