Read the statement by Michael Teeuw here.
Cant use showEnd icloud cal
-
@blvk I just added this to the next release calendar
you can get my test version and try it out
see https://forum.magicmirror.builders/topic/19070/call-for-testers-updated-calendar-moduleif showEnd:true, and start date is different then end date, then
add end date on using dateEndFormat
— this (dateEndFormat) might collide with dateEndFormat on events WITH time… need feedback -
At first sight I do not like it too much.
Daily repeating events have an end time now that does not make really sense (23:59) and the Holliday end time only makes sense when the dateEndFormat is extended to see the date.
And that makes it pretty crowded in the date/time column.IMHO :-)
timeFormat: "absolute", showEnd: true, showEndsOnlyWithDuration: true, //dateEndFormat: "HH:mm", dateEndFormat: "dddd MMM D - HH:mm",
I currently have
showEndsOnlyWithDuration: true,
but
showEndsOnlyWithDuration: false,
does not seem to do anything.timeFormat: "absolute", showEnd: false, showEndsOnlyWithDuration: true, dateEndFormat: "HH:mm", //dateEndFormat: "dddd MMM D - HH:mm",
Regards,
E.J.
-
@evroom thanks… that was what I was afraid of
can you change line calendar.js 439 to be like this, use the FullDayEventFormat, so not different that begin
timeWrapper.innerHTML += CalendarUtils.capFirst(moment(event.endDate, "x").format(this.config.fullDayEventDateFormat));
-
@sdetweil said in Cant use showEnd icloud cal:
calendar.js
~/MagicMirror/modules/default/calendar/calendar.js
this.config.fullDayEventDateFormat
showEnd: true, showEndsOnlyWithDuration: true,
showEnd: false, showEndsOnlyWithDuration: true,
-
@evroom that looks better , is it better?
only w duration only applies to date-time eventsbut same day shouldnt have add end show (but i compared full internal date value, which includes a utc time value which would be different)
its ‘more’ consistent with end showing, but illogical to me to have start and end on the same day
-
so try this , new line 437. only show end if the end date is different than the start date
if (this.config.showEnd && moment(event.startDate,"x").format("YYYYMMDD") !== moment(event.endDate,"x").format("YYYYMMDD")) {
-
In short, I think it is looking better now.
To make full profit from ‘showEnd: true’ one should use a ‘dateEndFormat’ that makes sense, not like mine.
The only thing that I notice, is that ‘showEndsOnlyWithDuration’ is not doing anything.
In my examples I only see a change when I toggle ‘showEnd’.urgency: 0, timeFormat: "absolute", dateFormat: "dddd MMM D - HH:mm", dateEndFormat: "HH:mm", fullDayEventDateFormat: "dddd MMM D", showEnd: true, showEndsOnlyWithDuration: true, getRelative: 0,
showEnd: true, showEndsOnlyWithDuration: false,
showEnd: false, showEndsOnlyWithDuration: true,
showEnd: false, showEndsOnlyWithDuration: false,
-
you don’t have a full day event across multiple days NOT repeating
examplevacation mon-friday allday 1 NON-repeating event
repeating are handled differently
show start, but not repeating end
with sliceMultiDayEvents:true, // for REPEATING only (1 day event 5 times)see each day of repeating 1/5 2/5 3/5 ... 5/5 then next day 2/5 etc
@evroom said in Cant use showEnd icloud cal:
To make full profit from ‘showEnd: true’ one should use a ‘dateEndFormat’ that makes sense, not like mine.
sorry, don’t understand this, I thought prior note said TIME display on fullday events was wrong… endFormat is for events with time (IMHO)
The only thing that I notice, is that ‘showEndsOnlyWithDuration’ is not doing anything.
ok, the code here is
// Add end time if showEnd if (this.config.showEnd) { if (this.config.showEndsOnlyWithDuration && event.startDate === event.endDate) { // no duration here, don't display end } else { timeWrapper.innerHTML += "-"; timeWrapper.innerHTML += CalendarUtils.capFirst(moment(event.endDate, "x").format(this.config.dateEndFormat)); } }
BUT,
immediately AFTER this is the test for fullday events, which changes the timeWrapperSo, this would ONLY apply
not-fullday
not repeating
event start on Monday:20:00:end on Tuesday:6:00 sleep over at Bobslike this
I see the bug… testing 2 things to together
-
@evroom
change lines 415 —if (this.config.timeFormat === "absolute") { // Use dateFormat timeWrapper.innerHTML = CalendarUtils.capFirst(moment(event.startDate, "x").format(this.config.dateFormat)); // Add end time if showEnd if (this.config.showEnd) { if (event.startDate !== event.endDate) { // duration here, display end if requested if(this.config.showEndsOnlyWithDuration){ timeWrapper.innerHTML += "-"; timeWrapper.innerHTML += CalendarUtils.capFirst(moment(event.endDate, "x").format(this.config.dateEndFormat)); } } } // For full day events we use the fullDayEventDateFormat if (event.fullDayEvent) {
-
Sorry, do not want to cause confusion.
One should probably not do a quick test right after a full working day:-)
The number of test cases seems endless.Do I remove the earlier changes ((lines 437 and 439) before changing line 415 ?