Skip to content

Conversation

@vespasianvs
Copy link
Contributor

This adds a drag handle to the bottom of an event in day and week view so that the length of the event can be easily changed.

Screen.Recording.2025-02-21.150304.mp4

This depends on my PR #416 as I wanted the updated packages before I started doing my changes.

@vespasianvs
Copy link
Contributor Author

I plan to implement more accurate dragging next for setting event start times - the idea would be drag the event to the correct start time, then resize it to the correct finish time. This would make it in line with many other calendar apps.

@vespasianvs
Copy link
Contributor Author

I'm also considering whether I want to offer a 'dragSnap' scheduler option that would snap resizing and dragging of events to, for example, the nearest 5 minutes. This would mean we could keep the 'step' option that we current have for the actual drawing of the calendar, but also snap event drag and resize to a different unit.

@aldabil21
Copy link
Owner

Amazing @vespasianvs! I assume this would be applicable on week/day views only? month view might have some limitation? (horizontal/vertical sizing, plus days instead of time).
Having it on week/day only as starting point is an amazing addition

@vespasianvs
Copy link
Contributor Author

Yeah - it's just week/day views only and doesn't work for multiday events as it's for resizing the hours. A similar strategy should work in those cases, but I've not done it as I'm afraid it's not something I need right now for the project that I'm working on.

@vespasianvs
Copy link
Contributor Author

Changed from react-router-dom to react-router: https://www.npmjs.com/package/react-router-dom

@kevinlaw91
Copy link

I'm also considering whether I want to offer a 'dragSnap' scheduler option that would snap resizing and dragging of events to, for example, the nearest 5 minutes. This would mean we could keep the 'step' option that we current have for the actual drawing of the calendar, but also snap event drag and resize to a different unit.

if we can set the snap rule using a custom function that would be great. so we can snap if minute%5/%10/%15/%30, or some crazy rule like during sunday, if hour=12pm/6pm, minute snap can only be 32. return false for other value of minute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants