From 7ef0a275f0e0582895380ad78df4d1148abac74d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 29 Aug 2020 14:35:22 +0100 Subject: [PATCH] Check for blank last row of calendar --- webinterface.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webinterface.py b/webinterface.py index 6bba941d2..778565009 100644 --- a/webinterface.py +++ b/webinterface.py @@ -6647,7 +6647,9 @@ def htmlCalendar(translate: {}, dayOfMonth = 0 dow = weekDayOfMonthStart(monthNumber, year) for weekOfMonth in range(1, 7): - calendarStr += ' \n' + if dayOfMonth == daysInMonth: + continue + calendarStr += ' \n' for dayNumber in range(1, 8): if (weekOfMonth > 1 and dayOfMonth < daysInMonth) or \ (weekOfMonth == 1 and dayNumber >= dow):