private void PickDate(DateTime minDateTime, bool isPickingStartDate) { var datePickerDialog = new CustomDatePickerDialog(minDateTime); datePickerDialog.PickDate += (s, se) => { if (!(s is DateTime dateTime)) { return; } if (isPickingStartDate) { startTime = new DateTime(dateTime.Year, dateTime.Month, dateTime.Day, startTime.Hour, startTime.Minute, startTime.Second); UpdateTime(); } else { endTime = new DateTime(dateTime.Year, dateTime.Month, dateTime.Day, endTime.Hour, endTime.Minute, endTime.Second); } UpdateView(); }; datePickerDialog.Show(FragmentManager, ""); }
protected void PickDeadline(object sender, EventArgs eventArgs) { var datePickerDialog = new CustomDatePickerDialog(); datePickerDialog.PickDate += (s, e) => { if (s is DateTime dateTime) { deadLine = dateTime; edtDeadline.Text = dateTime.ToDateString(); } }; datePickerDialog.Show(FragmentManager, ""); }