-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calendar Enhancement - End Date for dateheaders Time Format #2192
Comments
Could you please send a PR (if its not already fixed in the develop branch). Thanks! |
I am happy to collaborate on this fix 👍 @doubled136, could you describe a bit how to reproduce the issue? |
@sbehrends I was able to reproduce this issue. I have the following set in my config.js for the default calendar module:
But the calendar on my MagicMirror only shows the start time of events and not the end time. I can confirm that adding @doubled136's code works (although for me it was line 312 in calendar.js, not line 273). |
This fix works for me too. |
I might take a stab at this and provide a PR, could you assign this issue to me @MichMich ? |
Created a PR for @doubled136 fix, maybe you can check it out? |
seems to be fixed with the above PR, so should be closed @doubled136 @MichMich |
Not really sure how to pull or merge for a feature enhancement. In the Calendar module, I noticed that when "dateheaders" is selected, "showEnd" doesn't do anything but it would be reasonable to allow the option to show an end time, especially since showEnd is false by default.
From line 273 in calendar.js, I added an if statement to check for showEnd and publish the end time of an event:
timeWrapper.innerHTML = moment(event.startDate, "x").format("LT");
//Add for End Date from showEnd for dataheaders
if (this.config.showEnd) {
timeWrapper.innerHTML += " - " + moment(event.endDate, "x").format("LT");
}
Not sure if this is helpful but I figured I would put it out there.
The text was updated successfully, but these errors were encountered: