Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
fix: Correct DragAndDrop event resizing in 'month' view
Browse files Browse the repository at this point in the history
This corrects an issue where resizing an event (dragging handle to the right) would add an additional day, in certain scenarios.

jquense#2012
  • Loading branch information
aLeSangK authored Jan 25, 2022
1 parent 5cca631 commit e3d96e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/addons/dragAndDrop/WeekWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ class WeekWrapper extends React.Component {
if (direction === 'RIGHT') {
if (cursorInRow) {
if (slotMetrics.last < start) return this.reset()
end = localizer.add(date, 1, 'day')
if (localizer.eq(localizer.startOf(end, 'day'), end))
end = localizer.add(date, 1, 'day')
else end = date
} else if (
localizer.inRange(start, slotMetrics.first, slotMetrics.last) ||
(bounds.bottom < point.y && +slotMetrics.first > +start)
Expand Down

0 comments on commit e3d96e5

Please sign in to comment.