+ if (context != null && provider != null)
+ {
+ editorService = (IWindowsFormsEditorService)provider.GetService (typeof (IWindowsFormsEditorService));
+ if (editorService != null)
+ {
+ if (!(value is DateTime))
+ return value;
+
+ editContent = (DateTime)value;
+ if (editContent > control.MaxDate || editContent < control.MinDate)
+ control.SelectionStart = DateTime.Today;
+ else
+ control.SelectionStart = editContent;
+
+ editorService.DropDownControl (control);
+
+ return editContent;
+ }
+ }
+ return base.EditValue (context, provider, value);
+ }
+
+ void control_DateSelected (object sender, DateRangeEventArgs e)
+ {
+ editContent = e.Start;
+ editorService.CloseDropDown ();