scroll via clicking & dragging
See original GitHub issueFeature Requests
I am trying to implement a ‘grab & drag’ on the scheduler. I am so close but have not been able to implement. I opened a StackOverflow but no takers. Can anyone help here?
below is the code that I have so far. It almost works but has a slight bug where it takes you to the start of the day.
$('.fc-scroller-canvas').on('mousedown', function(e) { console.log('pageX:::', e.pageX) $('.fc-scroller-canvas').on('mousemove', function(evt) { console.log('clientX:::', evt.clientX) $('.fc-scroller').stop(false, true).animate({ scrollLeft: e.pageX - evt.clientX }); }); }); $('.fc-scroller-canvas').on('mouseup', function() { $('.fc-scroller-canvas').off('mousemove'); });
@arshaw
https://stackoverflow.com/questions/49312632/fullcalendar-scheduler-grab-and-drag-horizontal
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (1 by maintainers)
Top GitHub Comments
I had the same problem, managed to fix it and posted my answer here.
It allows panning anywhere on the calendar in both directions but you should be able to tweak to suite
I’m currently working with a project using the last version of fullcalendar, and i need to make work the horizontal scrolling when dragging events to the right, I tried everything mentioned here, but only the vertical scroll is working
Any idea?