| Issue 1829: | Add a view displaying a number of weeks around the current date. | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Currently the only multi-week view is month-based, rather than week-based. I'm of the opinion that this is overly rigid and have been looking for a way to create a calendar that shows the current week, the previous week and the next three weeks. That gives a total of five weeks for a fairly decent overview of recent and upcoming events. I'm currently working on an project for managing events for my SAR. There is a lot to be done and this calendar would be of great help. If I can't find this calendar feature I'll probably cobble something up myself but the more experienced contributors to this project would probably do so faster and better. Hence, this feature suggestion. :-)
Aug 24, 2013
(No comment was entered for this change.)
Status:
Duplicate
Mergedinto: 692
Sep 23, 2013
I've been looking at the documentation and don't see this as a duplicate. The closest I've seen to this is the weekMode option for the month view. Is there really a way to select five weeks and have the view default to a week before the current date and three weeks following? |
|
| ► Sign in to add a comment |
Well, as happens, I ended up toying around and created a little view that seems to work fine (though I still haven't dug around the code enough to know if it's according to specs). In case anyone's interested: fcViews.basicWeek = BasicWeekView; function BasicWeekView(element, calendar) { var t = this; // exports t.render = render; // imports BasicView.call(t, element, calendar, 'basicWeek'); var opt = t.opt; var renderBasic = t.renderBasic; var formatDates = calendar.formatDates; function render(date, delta) { if (delta) { addDays(date, delta * 7); } var start = addDays(cloneDate(date), -((date.getDay() - opt('firstDay') + 7) % 7)); var end = addDays(cloneDate(start), 7); var visStart = cloneDate(start); var visEnd = cloneDate(end); var weekends = opt('weekends'); if (!weekends) { skipWeekend(visStart); skipWeekend(visEnd, -1, true); } t.title = formatDates( visStart, addDays(cloneDate(visEnd), -1), opt('titleFormat') ); t.start = start; t.end = end; t.visStart = visStart; t.visEnd = visEnd; renderBasic(1, weekends ? 7 : 5, false); } } ;;