Skip to content

Commit 070a135

Browse files
committed
fix sdate shown for in progress fullday multi-day events
1 parent 98ed468 commit 070a135

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/default/calendar/calendar.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,10 @@ Module.register("calendar", {
438438
if (this.config.showEnd && !this.config.showEndsOnlyWithDuration && moment(event.startDate, "x").format("YYYYMMDD") !== moment(event.endDate, "x").format("YYYYMMDD")) {
439439
timeWrapper.innerHTML += "-";
440440
timeWrapper.innerHTML += CalendarUtils.capFirst(moment(event.endDate, "x").format(this.config.fullDayEventDateFormat));
441-
}
441+
} else
442+
if ((moment(event.startDate, "x").format("YYYYMMDD") !== moment(event.endDate, "x").format("YYYYMMDD")) && (moment(event.startDate, "x") < moment(now, "x"))) {
443+
timeWrapper.innerHTML = CalendarUtils.capFirst(moment(now, "x").format(this.config.fullDayEventDateFormat));
444+
}
442445
} else if (this.config.getRelative > 0 && event.startDate < now) {
443446
// Ongoing and getRelative is set
444447
timeWrapper.innerHTML = CalendarUtils.capFirst(

0 commit comments

Comments
 (0)