calendarui/editors/src/calenalldayfield.cpp
branchRCL_3
changeset 86 ed599363c2d7
parent 66 bd7edf625bdd
equal deleted inserted replaced
78:356f28cd5ca0 86:ed599363c2d7
   167                 {
   167                 {
   168                 endDate = startDate;
   168                 endDate = startDate;
   169                 }
   169                 }
   170             }
   170             }
   171 		
   171 		
   172 		iUnifiedEditor.EditorFields().SetDateField( ECalenEditorStartDate, startDate, EFalse );
   172 		iUnifiedEditor.EditorFields().SetDateField( ECalenEditorStartDate, startDate, ETrue );
   173         iUnifiedEditor.EditorFields().SetDateField( ECalenEditorEndDate, endDate, EFalse );
   173         iUnifiedEditor.EditorFields().SetDateField( ECalenEditorEndDate, endDate, ETrue );
   174         }
   174         }
   175      else
   175      else
   176         { 
   176         { 
   177         if( iUnifiedEditor.GetEntryType()== CCalEntry::EAppt )
   177         if( iUnifiedEditor.GetEntryType()== CCalEntry::EAppt )
   178             {
   178             {
   179             // update End date field as per Start date field value
   179             // update End date field as per Start date field value
   180             TTime startDate = iUnifiedEditor.Edited().StartDateTime();
   180             TTime startDate = iUnifiedEditor.Edited().StartDateTime();
   181             TTime endDate = iUnifiedEditor.Edited().EndDateTime();
   181             TTime endDate = iUnifiedEditor.Edited().EndDateTime();
   182             
   182             
   183             iUnifiedEditor.EditorFields().SetDateField( ECalenEditorStartDate, startDate, EFalse );
   183             iUnifiedEditor.EditorFields().SetDateField( ECalenEditorStartDate, startDate, ETrue );
   184             iUnifiedEditor.EditorFields().SetTimeField( ECalenEditorStartTime, startDate, EFalse );
   184             iUnifiedEditor.EditorFields().SetTimeField( ECalenEditorStartTime, startDate, ETrue );
   185             iUnifiedEditor.EditorFields().SetDateField( ECalenEditorEndDate, endDate, EFalse );
   185             iUnifiedEditor.EditorFields().SetDateField( ECalenEditorEndDate, endDate, ETrue );
   186             iUnifiedEditor.EditorFields().SetTimeField( ECalenEditorEndTime, endDate, EFalse );
   186             iUnifiedEditor.EditorFields().SetTimeField( ECalenEditorEndTime, endDate, ETrue );
   187             }
   187             }
   188         else if( iUnifiedEditor.GetEntryType()== CCalEntry::EEvent )
   188         else if( iUnifiedEditor.GetEntryType()== CCalEntry::EEvent )
   189             {
   189             {
   190             TTime startTime = iUnifiedEditor.Edited().StartDateTime();
   190             TTime startTime = iUnifiedEditor.Edited().StartDateTime();
   191             iUnifiedEditor.EditorFields().SetDateField( ECalenEditorStartDate, startTime, EFalse );
   191             iUnifiedEditor.EditorFields().SetDateField( ECalenEditorStartDate, startTime, ETrue );
   192             iUnifiedEditor.EditorFields().SetTimeField( ECalenEditorStartTime, startTime, EFalse );
   192             iUnifiedEditor.EditorFields().SetTimeField( ECalenEditorStartTime, startTime, ETrue );
   193             }
   193             }
   194         }    
   194         }    
   195              
   195              
   196         TRACE_EXIT_POINT
   196         TRACE_EXIT_POINT
   197     }
   197     }
   212     if( aAllDayEvent )
   212     if( aAllDayEvent )
   213         {
   213         {
   214         // AllDay event, delete Start time & End time fields from form.
   214         // AllDay event, delete Start time & End time fields from form.
   215         if( eventStartTimeCtrl )
   215         if( eventStartTimeCtrl )
   216             {
   216             {
   217             iUnifiedEditor.DeleteLine( ECalenEditorStartTime,EFalse );
   217             iUnifiedEditor.DeleteLine( ECalenEditorStartTime,ETrue );
   218             }
   218             }
   219         if( eventEndTimeCtrl )
   219         if( eventEndTimeCtrl )
   220             {
   220             {
   221             iUnifiedEditor.DeleteLine( ECalenEditorEndTime,EFalse );
   221             iUnifiedEditor.DeleteLine( ECalenEditorEndTime,ETrue );
   222             }
   222             }
   223         }
   223         }
   224     else
   224     else
   225         {
   225         {
   226         // Non AllDay event, add Start time & End time fields to form. 
   226         // Non AllDay event, add Start time & End time fields to form.