Skip to content

Commit

Permalink
fix sdate shown for in progress fullday multi-day events
Browse files Browse the repository at this point in the history
  • Loading branch information
sdetweil committed Nov 20, 2024
1 parent 98ed468 commit 070a135
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/default/calendar/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,10 @@ Module.register("calendar", {
if (this.config.showEnd && !this.config.showEndsOnlyWithDuration && moment(event.startDate, "x").format("YYYYMMDD") !== moment(event.endDate, "x").format("YYYYMMDD")) {
timeWrapper.innerHTML += "-";
timeWrapper.innerHTML += CalendarUtils.capFirst(moment(event.endDate, "x").format(this.config.fullDayEventDateFormat));
}
} else
if ((moment(event.startDate, "x").format("YYYYMMDD") !== moment(event.endDate, "x").format("YYYYMMDD")) && (moment(event.startDate, "x") < moment(now, "x"))) {
timeWrapper.innerHTML = CalendarUtils.capFirst(moment(now, "x").format(this.config.fullDayEventDateFormat));
}
} else if (this.config.getRelative > 0 && event.startDate < now) {
// Ongoing and getRelative is set
timeWrapper.innerHTML = CalendarUtils.capFirst(
Expand Down

0 comments on commit 070a135

Please sign in to comment.