From: Manoj Das Date: Fri, 3 May 2013 10:23:31 +0000 (+0530) Subject: N_SE-37324 X-Git-Tag: submit/tizen_2.1/20130514.050937~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1937ab8479bdbe80e0e6e6928463542156b8d2d6;p=apps%2Fosp%2FCalendar.git N_SE-37324 Change-Id: Iad60419adb77c2816c0ea22238ef05516525d566 --- diff --git a/src/ClEventEditorForm.cpp b/src/ClEventEditorForm.cpp index 8724a49..edb97db 100644 --- a/src/ClEventEditorForm.cpp +++ b/src/ClEventEditorForm.cpp @@ -1114,6 +1114,24 @@ EventEditorForm::OnDateChanged(const Control& source, int year, int month, int d __pEditTimeEndTime->Invalidate(true); __pEditDateEndDate->Invalidate(true); + + startTime.SetValue(__pEditDateStartDate->GetDate()); + startTime.Add(__pEditTimeStartTime->GetTime().GetTime()); + endTime.SetValue(__pEditDateEndDate->GetDate()); + endTime.Add(__pEditTimeEndTime->GetTime().GetTime()); + + if(startTime > endTime) + { + endTime = startTime; + endTime.AddMinutes(59 - endTime.GetMinute()); + r = __pPm->SetStartEndTime(startTime, endTime); + __pEditTimeEndTime->SetTime(__pPm->GetEndTime()); + __pEditDateEndDate->SetDate(__pPm->GetEndTime()); + __pEditTimeEndTime->Invalidate(true); + __pEditDateEndDate->Invalidate(true); + } + + if (r != E_SUCCESS) { MessageBox msgBox; @@ -1186,6 +1204,22 @@ EventEditorForm::OnTimeChanged(const Control& source, int hour, int minute) __pEditTimeEndTime->Invalidate(true); __pEditDateEndDate->Invalidate(true); + startTime.SetValue(__pEditDateStartDate->GetDate()); + startTime.Add(__pEditTimeStartTime->GetTime().GetTime()); + endTime.SetValue(__pEditDateEndDate->GetDate()); + endTime.Add(__pEditTimeEndTime->GetTime().GetTime()); + + if(startTime > endTime) + { + endTime = startTime; + endTime.AddMinutes(59 - endTime.GetMinute()); + r = __pPm->SetStartEndTime(startTime, endTime); + __pEditTimeEndTime->SetTime(__pPm->GetEndTime()); + __pEditDateEndDate->SetDate(__pPm->GetEndTime()); + __pEditTimeEndTime->Invalidate(true); + __pEditDateEndDate->Invalidate(true); + } + if (r != E_SUCCESS) { MessageBox msgBox;