Show dates in calendar week selection

This commit is contained in:
Raphael Michel
2020-10-05 17:29:19 +02:00
parent a31f0c1bc8
commit e9a972ad60
5 changed files with 14 additions and 8 deletions

View File

@@ -522,8 +522,7 @@ class WeekCalendarView(OrganizerViewMixin, EventListMixin, TemplateView):
ebd = self._events_by_day(before, after)
ctx['days'] = days_for_template(ebd, week)
ctx['weeks'] = [date(self.year, i + 1, 1) for i in range(12)]
ctx['weeks'] = [i + 1 for i in range(53)]
ctx['weeks'] = [(date.fromisocalendar(self.year, i + 1, 1), date.fromisocalendar(self.year, i + 1, 7)) for i in range(53)]
ctx['years'] = range(now().year - 2, now().year + 3)
ctx['week_format'] = get_format('WEEK_FORMAT')
if ctx['week_format'] == 'WEEK_FORMAT':