Fix time dispaly in day popup
This commit is contained in:
@@ -52,6 +52,14 @@
|
||||
return pad2(d.getHours()) + ':' + pad2(d.getMinutes());
|
||||
}
|
||||
|
||||
function formatEventListTime(startIso, fallbackTime) {
|
||||
var formatted = formatTimeOnly(startIso);
|
||||
if (!formatted || formatted === startIso) {
|
||||
return fallbackTime || '';
|
||||
}
|
||||
return formatted;
|
||||
}
|
||||
|
||||
function isSameMoment(left, right) {
|
||||
if (!left || !right) return false;
|
||||
return left === right;
|
||||
@@ -300,9 +308,13 @@
|
||||
+ ' data-event-recurrence="' + escapeHtml(ev.recurrence || '') + '"'
|
||||
+ ' data-event-date="' + escapeHtml(ev.date || dateIso) + '"';
|
||||
|
||||
var timeLabel = '';
|
||||
var timeStr = '';
|
||||
if (!ev.allDay && ev.time) {
|
||||
timeStr = '<span class="luxtools-event-time">' + escapeHtml(ev.time) + '</span> - ';
|
||||
if (!ev.allDay) {
|
||||
timeLabel = formatEventListTime(ev.start || '', ev.time || '');
|
||||
}
|
||||
if (timeLabel) {
|
||||
timeStr = '<span class="luxtools-event-time">' + escapeHtml(timeLabel) + '</span> - ';
|
||||
}
|
||||
html += '<li class="luxtools-day-popup-event-item"' + attrs + '>'
|
||||
+ timeStr
|
||||
|
||||
Reference in New Issue
Block a user