Пример #1
0
        void UpdateDate()
        {
            var date = AddDatePicker.GetDate(Element).ToNSDate();

            _picker.SetDate(date, false);
            _preSelectedDate = date;
        }
        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);
        }