diff --git a/src/addons/dragAndDrop/EventContainerWrapper.js b/src/addons/dragAndDrop/EventContainerWrapper.js index d92da7f50..ffa6eecca 100644 --- a/src/addons/dragAndDrop/EventContainerWrapper.js +++ b/src/addons/dragAndDrop/EventContainerWrapper.js @@ -94,7 +94,7 @@ class EventContainerWrapper extends React.Component { 'minutes' ) - this.update(event, slotMetrics.getRange(currentSlot, end)) + this.update(event, slotMetrics.getRange(currentSlot, end, false, true)) } handleResize(point, boundaryBox) { diff --git a/src/utils/TimeSlots.js b/src/utils/TimeSlots.js index e0118b554..06e399dc4 100644 --- a/src/utils/TimeSlots.js +++ b/src/utils/TimeSlots.js @@ -124,9 +124,11 @@ export function getSlotMetrics({ min: start, max: end, step, timeslots }) { return dates.gt(dates.merge(end, date), end, 'minutes') }, - getRange(rangeStart, rangeEnd) { - rangeStart = dates.min(end, dates.max(start, rangeStart)) - rangeEnd = dates.min(end, dates.max(start, rangeEnd)) + getRange(rangeStart, rangeEnd, ignoreMin, ignoreMax) { + if (!ignoreMin) + rangeStart = dates.min(end, dates.max(start, rangeStart)) + if (!ignoreMax) + rangeEnd = dates.min(end, dates.max(start, rangeEnd)) const rangeStartMin = positionFromDate(rangeStart) const rangeEndMin = positionFromDate(rangeEnd)