Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DnD for multiday events to not cut end date #1285

Closed
xtursky opened this issue Apr 15, 2019 · 5 comments
Closed

Fix DnD for multiday events to not cut end date #1285

xtursky opened this issue Apr 15, 2019 · 5 comments

Comments

@xtursky
Copy link
Contributor

xtursky commented Apr 15, 2019

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.

@xtursky xtursky changed the title Allow DnD for multiday events correctly to not limit end date Fix DnD for multiday events to not cut end date Apr 15, 2019
@arecvlohe
Copy link
Collaborator

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

@arecvlohe arecvlohe added the bug label Apr 30, 2019
@xtursky
Copy link
Contributor Author

xtursky commented May 2, 2019

@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.

@felgeekpe
Copy link

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

@xtursky
Copy link
Contributor Author

xtursky commented Jun 10, 2019

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

@stale
Copy link

stale bot commented Aug 9, 2019

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.

@stale stale bot added the wontfix label Aug 9, 2019
@stale stale bot closed this as completed Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants