void CreateDialog() { var date = AddDatePicker.GetDate(Element); _dialog = new DatePickerDialog(_view.Context, (o, e) => { AddDatePicker.SetDate(Element, e.Date); _command?.Execute(e.Date); _view.ClearFocus(); _dialog.CancelEvent -= OnCancelButtonClicked; _dialog = null; }, date.Year, date.Month - 1, date.Day); _dialog.SetCanceledOnTouchOutside(true); }
//METHOD: Create dialog for Date Picker. #pragma warning disable protected override Dialog OnCreateDialog(int id) { #pragma warning restore DatePickerDialog dpd = new DatePickerDialog(this, HandleDateSet, todays_date.Year, todays_date.Month - 1, todays_date.Day); dpd.SetMessage("Requests issued within 2 days will add a $15.00 fee."); dpd.SetIcon(Resource.Drawable.ic_action_time); dpd.SetCanceledOnTouchOutside(false); dpd.SetCancelable(false); #pragma warning disable dpd.SetButton("Cancel", dpd); dpd.SetButton2("Confirm", dpd); #pragma warning restore return(dpd); }