Issue 1829: Add a view displaying a number of weeks around the current date.
Status:  Duplicate
Merged:  issue 692
Owner: ----
Closed:  Aug 2013
Reported by martin.s...@gmail.com, May 9, 2013
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. :-)
Jul 22, 2013
#1 martin.s...@gmail.com
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);
   }


}

;;
Aug 24, 2013
Project Member #2 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Duplicate
Mergedinto: 692
Sep 23, 2013
#3 martin.s...@gmail.com
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?