Skip to content

Commit e3d96e5

Browse files
author
aLeSangK
authored
fix: Correct DragAndDrop event resizing in 'month' view
This corrects an issue where resizing an event (dragging handle to the right) would add an additional day, in certain scenarios. jquense#2012
1 parent 5cca631 commit e3d96e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/addons/dragAndDrop/WeekWrapper.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ class WeekWrapper extends React.Component {
108108
if (direction === 'RIGHT') {
109109
if (cursorInRow) {
110110
if (slotMetrics.last < start) return this.reset()
111-
end = localizer.add(date, 1, 'day')
111+
if (localizer.eq(localizer.startOf(end, 'day'), end))
112+
end = localizer.add(date, 1, 'day')
113+
else end = date
112114
} else if (
113115
localizer.inRange(start, slotMetrics.first, slotMetrics.last) ||
114116
(bounds.bottom < point.y && +slotMetrics.first > +start)

0 commit comments

Comments
 (0)