Read the statement by Michael Teeuw here.
Solved Default Calender relative removes start time
-
@cptkex That’s an interesting question!
I’m working on manipulating the calendar and moment.js as well.The line you are looking for is line 302
timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow());
.fromnow() creates the “in five hours” entry. You would have to stuff the beginning time into that, maybe it would work like this:
timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow()) + moment(event.startDate).format('HH:mm');
This could work…
In your calendar, do you really have this entry?
“Meeting 25th november in five hours - 1800”Because then it seems you have already manpulatied the entry to also show the date!?
-
@lavolp3 thanks for that suggestion, ill try that tonight when i get home!
I will have to check when i get home, i was moving between the three options of absolute, relative and dateheader and i dont really remember if it gave me the date when i switched back to absolute.
ill doublecheck tonight, because i was trying to achieve my wish of having the start time to be absolute by changing the startdate variable to MMM Do HH:mm. ill get back to you on this. Again, sorry, kind of new at this.
-
@cptkex
Aha! The “dateheaders” option is quite new and I haven’t seen that before. Will check that out as well -
@lavolp3 I’m home and I was mistaken. It does not show the date when it goes into relative, only the end time. I will try your code later tonight and see if it works.
-
@lavolp3 i tried your addition to the code but it only said
meeting in 5 hoursInvalid Date-1800
-
This post is deleted! -
@cptkex There is an open issue that might describe the same issue:
https://github.com/MichMich/MagicMirror/issues/1457
Yours?
Else it might be worth following. -
@lavolp3 not mine, but thanks, i will keep an eye on it
-
@cptkex
You could try thistimeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow()) + this.capFirst(moment(event.startDate, "x").format(this.config.dateEndFormat));
I took the dirty way to use the dateEndFormat variable for a starting time.
This is just a guess! I haven’t tried it out yet… -
because of the ending times, I went 100% absolute. works best on a small screen, too…
dateFormat: “M/D h:mm a”,
fullDateEventDateFormat: “M/D”,
timeFormat: “absolute”,
getRelative: 0,
urgency: 0,
dateEndFormat: “h:mm a”,