167 { |
167 { |
168 endDate = startDate; |
168 endDate = startDate; |
169 } |
169 } |
170 } |
170 } |
171 |
171 |
172 iUnifiedEditor.EditorFields().SetDateField( ECalenEditorStartDate, startDate, ETrue ); |
172 iUnifiedEditor.EditorFields().SetDateField( ECalenEditorStartDate, startDate, EFalse ); |
173 iUnifiedEditor.EditorFields().SetDateField( ECalenEditorEndDate, endDate, ETrue ); |
173 iUnifiedEditor.EditorFields().SetDateField( ECalenEditorEndDate, endDate, EFalse ); |
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, ETrue ); |
183 iUnifiedEditor.EditorFields().SetDateField( ECalenEditorStartDate, startDate, EFalse ); |
184 iUnifiedEditor.EditorFields().SetTimeField( ECalenEditorStartTime, startDate, ETrue ); |
184 iUnifiedEditor.EditorFields().SetTimeField( ECalenEditorStartTime, startDate, EFalse ); |
185 iUnifiedEditor.EditorFields().SetDateField( ECalenEditorEndDate, endDate, ETrue ); |
185 iUnifiedEditor.EditorFields().SetDateField( ECalenEditorEndDate, endDate, EFalse ); |
186 iUnifiedEditor.EditorFields().SetTimeField( ECalenEditorEndTime, endDate, ETrue ); |
186 iUnifiedEditor.EditorFields().SetTimeField( ECalenEditorEndTime, endDate, EFalse ); |
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, ETrue ); |
191 iUnifiedEditor.EditorFields().SetDateField( ECalenEditorStartDate, startTime, EFalse ); |
192 iUnifiedEditor.EditorFields().SetTimeField( ECalenEditorStartTime, startTime, ETrue ); |
192 iUnifiedEditor.EditorFields().SetTimeField( ECalenEditorStartTime, startTime, EFalse ); |
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,ETrue ); |
217 iUnifiedEditor.DeleteLine( ECalenEditorStartTime,EFalse ); |
218 } |
218 } |
219 if( eventEndTimeCtrl ) |
219 if( eventEndTimeCtrl ) |
220 { |
220 { |
221 iUnifiedEditor.DeleteLine( ECalenEditorEndTime,ETrue ); |
221 iUnifiedEditor.DeleteLine( ECalenEditorEndTime,EFalse ); |
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. |