diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp --- a/korganizer/koeventpopupmenu.cpp +++ b/korganizer/koeventpopupmenu.cpp @@ -184,7 +184,15 @@ void KOEventPopupMenu::popupEdit() { if ( CalendarSupport::hasIncidence( mCurrentIncidence ) ) { - emit editIncidenceSignal( mCurrentIncidence, KDateTime() ); + const KCalCore::Incidence::Ptr inc = CalendarSupport::incidence(mCurrentIncidence); + KDateTime occurenceDate; + if ( inc->recurs() ) { + // We only have the currentDate and need to look for the occurence at this day + // getNextDateTime returns strictly later than the given datetime, so if an event starts a 0:00 we need to set one second before, that. + const KDateTime thisDateTime( mCurrentDate.addDays(-1), QTime(23,59,59), CalendarSupport::KCalPrefs::instance()->timeSpec() ); + occurenceDate = inc->recurrence()->getNextDateTime(thisDateTime); + } + emit editIncidenceSignal( mCurrentIncidence, occurenceDate ); } }