Author: ivanz
Date: 2008-02-12 12:21:16 -0500 (Tue, 12 Feb 2008)
New Revision: 95530
Modified:
trunk/mcs/class/System.Design/System.ComponentModel.Design/ChangeLog
trunk/mcs/class/System.Design/System.ComponentModel.Design/DateTimeEditor.cs
Log:
2008-02-12 Ivan N. Zlatev <[EMAIL PROTECTED]>
* DateTimeEditor.cs: Set edit value only if the user sets it
in the editor.
[Fixes #359159]
Modified: trunk/mcs/class/System.Design/System.ComponentModel.Design/ChangeLog
===================================================================
--- trunk/mcs/class/System.Design/System.ComponentModel.Design/ChangeLog
2008-02-12 16:57:58 UTC (rev 95529)
+++ trunk/mcs/class/System.Design/System.ComponentModel.Design/ChangeLog
2008-02-12 17:21:16 UTC (rev 95530)
@@ -1,3 +1,9 @@
+2008-02-12 Ivan N. Zlatev <[EMAIL PROTECTED]>
+
+ * DateTimeEditor.cs: Set edit value only if the user sets it
+ in the editor.
+ [Fixes #359159]
+
2008-02-05 Ivan N. Zlatev <[EMAIL PROTECTED]>
* MutilineStringEditor.cs: Make BorderStyle, Width and Height
Modified:
trunk/mcs/class/System.Design/System.ComponentModel.Design/DateTimeEditor.cs
===================================================================
---
trunk/mcs/class/System.Design/System.ComponentModel.Design/DateTimeEditor.cs
2008-02-12 16:57:58 UTC (rev 95529)
+++
trunk/mcs/class/System.Design/System.ComponentModel.Design/DateTimeEditor.cs
2008-02-12 17:21:16 UTC (rev 95530)
@@ -55,7 +55,6 @@
public DateTimeEditor ()
{
- control.LostFocus += new EventHandler (changeHandler);
control.DateSelected += new DateRangeEventHandler
(control_DateSelected);
}
@@ -71,10 +70,8 @@
editContent = (DateTime)value;
if (editContent > control.MaxDate ||
editContent < control.MinDate)
- editContent = DateTime.Today;
+ control.SelectionStart =
DateTime.Today;
- control.SelectionStart = editContent;
-
editorService.DropDownControl (control);
return editContent;
@@ -83,11 +80,6 @@
return base.EditValue (context, provider, value);
}
- void changeHandler (object sender, EventArgs e)
- {
- editContent = control.SelectionStart;
- }
-
void control_DateSelected (object sender, DateRangeEventArgs e)
{
editContent = e.Start;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches