public DatePickerService()
        {
            var date = DateTime.Now;

            _datePickerDialog = new DatePickerDialog(Context, this, date.Year, date.Month - 1, date.Day);
            _datePickerDialog.SetOnCancelListener(this);

            _timePickerDialog = new TimePickerDialog(Context, this, date.Hour, date.Minute, true);
            _timePickerDialog.SetOnCancelListener(this);
        }
Exemple #2
0
        private static BasisTimesUtils ShowDatePickerDialog(Context context, int themeId, string title, int year, int month, int day, IOnDatePickerListener onDateTimePickerListener)
        {
            datePickerDialog = new DatePickerDialog(context, themeId, new OnDateSetListener(onDateTimePickerListener), year, month - 1, day);
            datePickerDialog.SetOnCancelListener(new OnCancelListener(onDateTimePickerListener));

            if (!TextUtils.IsEmpty(title))
            {
                datePickerDialog.SetTitle(title);
            }
            datePickerDialog.Show();
            return(new BasisTimesUtils());
        }