calendarui/editors/src/calenalldayfield.cpp
branchRCL_3
changeset 14 21239b3bcd78
parent 0 f979ecb2b13e
child 28 96907930389d
equal deleted inserted replaced
13:1984aceb8774 14:21239b3bcd78
   160 
   160 
   161         // In case AllDay event end at "12:00am" 24/06/2009. 
   161         // In case AllDay event end at "12:00am" 24/06/2009. 
   162         // editor should display EndDate as 23/06/2009.
   162         // editor should display EndDate as 23/06/2009.
   163         if( endDate > startDate )
   163         if( endDate > startDate )
   164             {
   164             {
   165             //endDate -= TTimeIntervalDays( 1 );
   165             endDate -= TTimeIntervalDays( 1 );
   166             //endDate contains the time component also, even for same day endDate would be greater then startDate
   166             if( endDate < startDate )
   167             //subtracting 1 from endate will give endDate as one day before startDate.
   167                 {
   168             //For All day event Start date and End Date are same so assigning startDate to endDate.
   168                 endDate = startDate;
   169             endDate = startDate;
   169                 }
   170             }
   170             }
   171 		
   171 		
   172 		iUnifiedEditor.EditorFields().SetDateField( ECalenEditorStartDate, startDate, ETrue );
   172 		iUnifiedEditor.EditorFields().SetDateField( ECalenEditorStartDate, startDate, ETrue );
   173         iUnifiedEditor.EditorFields().SetDateField( ECalenEditorEndDate, endDate, ETrue );
   173         iUnifiedEditor.EditorFields().SetDateField( ECalenEditorEndDate, endDate, ETrue );
   174         }
   174         }