From 13df722d282f595ccd55fb477fb7d7f2f33c74de Mon Sep 17 00:00:00 2001 From: Dirk Heilig Date: Mon, 27 Jan 2025 17:43:37 +0100 Subject: [PATCH] add dayname to calendar --- themes/hugo-theme-flat/static/js/calendar.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/themes/hugo-theme-flat/static/js/calendar.js b/themes/hugo-theme-flat/static/js/calendar.js index 74eac7e..96c61db 100644 --- a/themes/hugo-theme-flat/static/js/calendar.js +++ b/themes/hugo-theme-flat/static/js/calendar.js @@ -20,6 +20,9 @@ const calRefresh=function () { el.remove() } }catch(e){} + + let weekDayNames = ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"]; + for (let item of cal) { let li = $("
  • "); //li.text(item.summary) @@ -35,6 +38,8 @@ const calRefresh=function () { let date = $(""); date.text( + weekDayNames[startDate.getDay()] + + "., " + zeropad(startDate.getDate()) + "." + zeropad(1 + startDate.getMonth()) +