diff --git a/event/static/js/calendar.js b/event/static/js/calendar.js index 9256c3b..4002700 100644 --- a/event/static/js/calendar.js +++ b/event/static/js/calendar.js @@ -53,6 +53,7 @@ class Calendar { this.createEventContainer(); this.createEventDetailsContainer(); + this.updateTimeSlotContainerGridStyle(); this.updateEventContainerGridStyle(); this.createTimeSlots(); @@ -153,9 +154,16 @@ class Calendar { } } + updateTimeSlotContainerGridStyle () { + this.timeSlotsContainerNode.css("grid-template-columns", + `repeat(${this.nbHoursToDisplay}, ${100 / this.nbHoursToDisplay }%)`); + } + updateTimeSlots () { this.timeSlotsContainerNode.empty(); + this.createTimeSlots(); + this.updateTimeSlotContainerGridStyle(); } getHourSlotWidth () {