Open carrythebanner opened 5 years ago
I looked into adding a custom handler with navLinkDayClick
option, to scroll the list to the chosen date. I got a start on it, but it needed some more tweaking to work properly so I fell back on FullCalendar's default behavior.
For future reference, I tried this:
navLinkDayClick: function(date) {
var dateString = moment(date).format("YYYY-MM-DD");
var heading = document.querySelectorAll("div[data-date='" + dateString + "']")[0];
heading.scrollIntoView();
}
Needs two improvements at least:
FullCalendar, the library we're using for the grid view, has an option to make each date label clickable. The default implementation is to load that day in the grid's day view, but we could also make it scroll the page to that day's rides in the event list (similar to the classic cal's month view).
Docs: https://fullcalendar.io/docs/date-nav-links