From a17ac1c16e6bec608bcc9dc5b9bf47bb1707ea43 Mon Sep 17 00:00:00 2001 From: Josef Spitzlberger <38983450+spitzlbergerj@users.noreply.github.com> Date: Sat, 13 Apr 2019 15:03:55 +0200 Subject: [PATCH] added Config Option nextDaysRelative added configuration option nextDaysRelative to always display today's and tomorrow's appointments in relative mode, even if timeformat is set to absolute --- modules/default/calendar/calendar.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 3aaed2ae..7133caaa 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -49,7 +49,8 @@ Module.register("calendar", { }, broadcastEvents: true, excludedEvents: [], - sliceMultiDayEvents: false + sliceMultiDayEvents: false, + nextDaysRelative: false }, // Define required scripts. @@ -326,7 +327,7 @@ Module.register("calendar", { // If event is within 6 hour, display 'in xxx' time format or moment.fromNow() timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow()); } else { - if(this.config.timeFormat === "absolute") { + if(this.config.timeFormat === "absolute" && !this.config.nextDaysRelative) { timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").format(this.config.dateFormat)); } else { // Otherwise just say 'Today/Tomorrow at such-n-such time'