private void ShowDatePicker(DateTime date, UIDatePickerMode mode, EventHandler valueChangedHandler)
        {
            var    actionSheetDatePicker = new ActionSheetDatePicker(this.View);
            NSDate nsDate = (NSDate)DateTime.SpecifyKind(date.AddHours(5), DateTimeKind.Utc);              // Adjust for central.

            actionSheetDatePicker.DatePicker.Date          = nsDate;
            actionSheetDatePicker.DatePicker.Mode          = mode;
            actionSheetDatePicker.DatePicker.ValueChanged += valueChangedHandler;
            actionSheetDatePicker.Show();
        }
Exemplo n.º 2
0
        public static void ShowDatePicker(this UIView view, DateTime date, UIDatePickerMode mode, EventHandler valueChangedHandler)
        {
            var actionSheetDatePicker = new ActionSheetDatePicker(view);

            actionSheetDatePicker.DatePicker.Date           = date.ToNSDate();
            actionSheetDatePicker.DatePicker.Mode           = mode;
            actionSheetDatePicker.DatePicker.MinuteInterval = 15;
            actionSheetDatePicker.DatePicker.ValueChanged  += valueChangedHandler;
            actionSheetDatePicker.Show();
        }