From a2a14cb84cf900d30ca01f44a09949f29e446f01 Mon Sep 17 00:00:00 2001 From: Daru13 Date: Sat, 24 Nov 2018 03:28:25 +0100 Subject: [PATCH] Add dedicated classes to first/last (daily) time slots. --- event/static/js/calendar.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/event/static/js/calendar.js b/event/static/js/calendar.js index cdd104b..f5d84e4 100644 --- a/event/static/js/calendar.js +++ b/event/static/js/calendar.js @@ -167,9 +167,14 @@ class Calendar { }) .appendTo(this.timeSlotsContainerNode); - if (i > 0 && hour === 0) { - timeSlotHourNode.addClass("cal-new-day"); - timeSlotBlockNode.addClass("cal-new-day"); + if (hour === 23) { + timeSlotHourNode.addClass("cal-last-hour"); + timeSlotBlockNode.addClass("cal-last-hour"); + } + + if (hour === 0) { + timeSlotHourNode.addClass("cal-first-hour"); + timeSlotBlockNode.addClass("cal-first-hour"); } } }