Skip to content

Commit

Permalink
fix(calendar): fixing calendar events
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsully83 authored and jgodi committed Jun 30, 2017
1 parent 42482d3 commit a64c2d0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils/calendar-utils/CalendarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export function getWeekView({ events = [], viewDate, weekStartsOn, excluded = []
}
return startSecondsDiff;
}).map((entry: WeekViewEvent) => {
const startOfView: Date = dateFns.setMinutes(dateFns.setHours(dateFns.startOfDay(viewDate), dayStart.hour), dayStart.minute);
const startOfView: Date = dateFns.setMinutes(dateFns.setHours(dateFns.startOfDay(entry.event.start), dayStart.hour), dayStart.minute);
const eventStart: Date = entry.event.start;
const hourHeightModifier: number = (hourSegments * segmentHeight) / MINUTES_IN_HOUR;
if (eventStart > startOfView) {
Expand All @@ -284,7 +284,6 @@ export function getWeekView({ events = [], viewDate, weekStartsOn, excluded = []
rowSpan + nextEvent.span <= DAYS_IN_WEEK &&
allocatedEvents.indexOf(nextEvent) === -1
) {
nextEvent.offset -= rowSpan;
rowSpan += nextEvent.span + nextEvent.offset;
allocatedEvents.push(nextEvent);
return true;
Expand Down

0 comments on commit a64c2d0

Please sign in to comment.