Skip to content

Commit

Permalink
small fix: correct duration for all-day events that are moved to the …
Browse files Browse the repository at this point in the history
…timed-events view
  • Loading branch information
jumartin committed Nov 10, 2016
1 parent c7764c7 commit cba683f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CalendarLib/MGCDayPlannerEKViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ - (void)dayPlannerView:(MGCDayPlannerView*)view moveEventOfType:(MGCEventType)ty
if (ev) {
NSDateComponents *duration = [self.calendar components:NSMinuteCalendarUnit fromDate:ev.startDate toDate:ev.endDate options:0];
if (ev.allDay && targetType == MGCTimedEventType) {
duration.minute = view.durationForNewTimedEvent * 60;
duration.minute = view.durationForNewTimedEvent / 60;
}
NSDate *end = [self.calendar dateByAddingComponents:duration toDate:targetDate options:0];

Expand Down

0 comments on commit cba683f

Please sign in to comment.