React-big-calendar: Fix DnD for multiday events to not cut end date

Created on 15 Apr 2019  路  5Comments  路  Source: jquense/react-big-calendar

Do you want to request a _feature_ or report a _bug_?

Bug / Question

What's the current behavior?

Currently it's not possible to DnD multiday event (in case of showMultiDayTimes=true). When dragging starts, end time is limited to end of current day by this line of code https://github.com/intljusticemission/react-big-calendar/blob/475674c6167391bd6212c1247fa29c1aea4c1b00/src/utils/TimeSlots.js#L129

@jquense question, is this just some safety done before DnD was introduced, or does it have it's meaning?

If this line is ignored, DnD seems to work for both one day and multiday events. End time is correctly calculated. Only small issue is, that only first day is visualized while dragging, but that I can live without.

What's the expected behavior?

To be able to DnD multiday event (in case of showMultiDayTimes=true) correctly. So the start and end time are not limited to the current day.

bug wontfix

All 5 comments

@xtursky This seems like it would be an easy fix if your solution above works. Mind submitting a PR?

@arecvlohe thanks for info. No problem to create a PR.
As I asked above, not sure if this is needed when DnD is not used.
So I wasn't sure if to change this generally or just for DnD addon. I'll prepare PR, test it and we will see.

@xtursky hi, any updates on the fix? Thanks!

@felgeekpe yeap, there is already PR waiting for review, just didn't reference it correctly. Thanks for asking.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KatiaPosPago picture KatiaPosPago  路  3Comments

The-Oracle picture The-Oracle  路  3Comments

martinnov92 picture martinnov92  路  3Comments

Hector26 picture Hector26  路  3Comments

manutenfruits picture manutenfruits  路  3Comments