")
+ .addClass("calendar-date calendar-week-number")
+ .attr("data-calendar-week-number", weekNumberText)
+ .html(`${weekNumberText}`);
+ this.$month.append($weekNumber);
+ }
const $day = this.createDay(dateNotesForMonth, this.date.getDate(), this.date.getDay());
@@ -329,13 +331,6 @@ export default class CalendarWidget extends RightDropdownButtonWidget {
this.$monthSelect.text(MONTHS[this.date.getMonth()]);
this.$yearSelect.val(this.date.getFullYear());
-
- for (const weekNumber of weekNumbers) {
- const $weekNumber = $("")
- .addClass("calendar-week-number")
- .text(weekNumber);
- this.$weekNumbers.append($weekNumber);
- }
}
async entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) {
diff --git a/src/public/stylesheets/calendar.css b/src/public/stylesheets/calendar.css
index 85b73381e..a1745d737 100644
--- a/src/public/stylesheets/calendar.css
+++ b/src/public/stylesheets/calendar.css
@@ -71,32 +71,6 @@
/* Disable the dropdown arrow */
}
-.calendar-container {
- display: flex;
-}
-
-.calendar-dropdown-widget .calendar-week-numbers {
- width: 30px;
- border-right: 1px solid var(--main-border-color);
- padding-right: 5px;
- margin-right: 5px;
- padding-top: 2.4rem;
-}
-
-.calendar-dropdown-widget .calendar-week-number {
- /* height: 2.4rem; */
- /* line-height: 2.4rem; */
- text-align: center;
- color: var(--muted-text-color);
- font-size: 0.9em;
-}
-
-.calendar-main {
- flex: 1;
- display: flex;
- flex-direction: column;
-}
-
.calendar-dropdown-widget .calendar-week {
display: flex;
flex-wrap: wrap;
@@ -104,10 +78,10 @@
.calendar-dropdown-widget .calendar-week span {
flex-direction: column;
- flex: 0 0 14.28%;
+ flex: 0 0 12.5%;
font-size: 1rem;
font-weight: bold;
- max-width: 14.28%;
+ max-width: 12.5%;
padding-top: 5px;
padding-bottom: 5px;
text-align: center;
@@ -119,13 +93,28 @@
flex-wrap: wrap;
}
+.calendar-dropdown-widget .calendar-week-number {
+ position: relative;
+}
+
+.calendar-dropdown-widget .calendar-week-number::after {
+ content: '';
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ width: 1px;
+ background-color: var(--main-border-color);
+ z-index: 2;
+}
+
.calendar-dropdown-widget .calendar-date {
align-items: center;
color: var(--main-text-color);
display: flex;
flex-direction: column;
- flex: 0 0 14.28%;
- max-width: 14.28%;
+ flex: 0 0 12.5%;
+ max-width: 12.5%;
padding: 0.4rem 0;
font-size: 120%;
}
@@ -155,4 +144,4 @@
.calendar-dropdown-widget .calendar-date:not(.calendar-date-active) {
cursor: pointer;
-}
+}
\ No newline at end of file