calendarui/editors/src/calenalldayfield.cpp
branchRCL_3
changeset 20 21239b3bcd78
parent 0 f979ecb2b13e
child 60 96907930389d
--- a/calendarui/editors/src/calenalldayfield.cpp	Wed Mar 31 21:29:10 2010 +0300
+++ b/calendarui/editors/src/calenalldayfield.cpp	Wed Apr 14 15:55:57 2010 +0300
@@ -162,11 +162,11 @@
         // editor should display EndDate as 23/06/2009.
         if( endDate > startDate )
             {
-            //endDate -= TTimeIntervalDays( 1 );
-            //endDate contains the time component also, even for same day endDate would be greater then startDate
-            //subtracting 1 from endate will give endDate as one day before startDate.
-            //For All day event Start date and End Date are same so assigning startDate to endDate.
-            endDate = startDate;
+            endDate -= TTimeIntervalDays( 1 );
+            if( endDate < startDate )
+                {
+                endDate = startDate;
+                }
             }
 		
 		iUnifiedEditor.EditorFields().SetDateField( ECalenEditorStartDate, startDate, ETrue );