| Issue 196: | Method for scrolling to a time (for agenda views) | |
| 14 people starred this issue and may be notified of changes. | Back to list |
Is there any way to go to a particular time in the agenda view once the calendar has been initialized?
Nov 27, 2009
Project Member
#1
adamrs...@gmail.com
Nov 27, 2009
It would do the trick if it worked once the calendar has been initialized... I can't get it to work programmatically
Nov 27, 2009
got it. you can't currently do this w/ gotoDate, but it would be a good feature to have. will be in an upcoming release.
Summary:
time in gotoDate method (for agenda views)
Status: Accepted Labels: -Type-Defect -Priority-Medium Type-Enhancement
Jan 20, 2010
i was able to put something together that might need a little tweaking as I'm still
testing it myself (adam might be able to tie it in better).
in the viewMethods object I added:
scrollToHour: function (hour) {
var self = this;
var scrollable = this.element.find(".fc-agenda-body");
var slot = hour;
var target = this.element.find(".fc-agenda-body .fc-axis:even:eq(" + slot + ")");
if(target.length){
scrollable.animate({scrollTop: 0}, 0, function() {
var targetOffset = target.offset().top;
var scroll = targetOffset - scrollable.offset().top - target.outerHeight();
scrollable.animate({scrollTop: scroll}, 500);
});
}
}
i tied it in by putting a call in each view 'render' method to automatically scroll
on render
i.e.
views.basicDay = function(element, options) {
return new Grid(element, options, {
render: function(date, delta, height, fetchEvents) {
if (delta) {
addDays(date, delta);
if (!options.weekends) {
skipWeekend(date, delta < 0 ? -1 : 1);
}
}
this.title = formatDate(date, this.option('titleFormat'), options);
this.start = this.visStart = cloneDate(date, true);
this.end = this.visEnd = addDays(cloneDate(this.start), 1);
this.renderGrid(1, 1, this.option('columnFormat'), false, height, fetchEvents);
this.scrollToHour(date.getHours());
}
});
}
Jan 10, 2012
Would you be able to put the full js file here, so we can see how you did it.
Aug 13, 2013
(No comment was entered for this change.)
Summary:
Scroll to time with gotoDate method (for agenda views)
(was: time in gotoDate method (for agenda views))
Labels: -Type-Enhancement Type-Feature
Aug 13, 2013
could be with `gotoDate`, which accepts a date AND time or maybe 'scrollToTime`, which only accepts a time
Summary:
Method for scrolling to a time (for agenda views)
(was: Scroll to time with gotoDate method (for agenda views))
Aug 13, 2013
Issue 626 has been merged into this issue.
Jun 5, 2014
Here is a implementation by @jtmanteo: https://github.com/arshaw/fullcalendar/pull/90 I have not tested it nor investigated its compatibility with v2, but worth checking out.
Nov 17, 2014
i simply hacked fullcaledar adding and id for each timeslice span then used jQuery scrollTo plugin.
Aug 21, 2015
Discussion for this issue has moved to the following URL: https://github.com/fullcalendar/fullcalendar/issues/467 This is because Google Code is shutting down. Apologies if you are being pestered with these notifications. This is a one-time event. Happy coding, Adam
Status:
ExportedToGithub
|
|
| ► Sign in to add a comment |