mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Show events of a configurable amount of past days (#3046)
Hi, want to include a birthday calendar to my mirror which shows upcoming birthdays and as a reminder birthdays of the last two days. I used [MMM-CalendarExt2](https://github.com/MMM-CalendarExt2/MMM-CalendarExt2) for this job in the past but the module is not supported any more and very complicated to configure. I managed to style the default calendar module to my needs but what i am missing is to display already past events within a configurable time range. I included the translations of "YESTERDAY" and "DAYBEFOREYESTERDAY" to all translation files and modified the code to accept a new option `pastDaysCount` which controls of how many days past events should be displayed. --------- Co-authored-by: Veeck <github@veeck.de>
This commit is contained in:
committed by
GitHub
parent
6d86ffade4
commit
a23769156e
@@ -16,6 +16,16 @@ describe("Calendar module", () => {
|
||||
});
|
||||
|
||||
describe("Test css classes", () => {
|
||||
it("has css class dayBeforeYesterday", async () => {
|
||||
await helpers.startApplication("tests/configs/modules/calendar/custom.js", "03 Jan 2030 12:30:00 GMT");
|
||||
await doTest(".dayBeforeYesterday");
|
||||
});
|
||||
|
||||
it("has css class yesterday", async () => {
|
||||
await helpers.startApplication("tests/configs/modules/calendar/custom.js", "02 Jan 2030 12:30:00 GMT");
|
||||
await doTest(".yesterday");
|
||||
});
|
||||
|
||||
it("has css class today", async () => {
|
||||
await helpers.startApplication("tests/configs/modules/calendar/custom.js", "01 Jan 2030 12:30:00 GMT");
|
||||
await doTest(".today");
|
||||
@@ -25,5 +35,10 @@ describe("Calendar module", () => {
|
||||
await helpers.startApplication("tests/configs/modules/calendar/custom.js", "31 Dec 2029 12:30:00 GMT");
|
||||
await doTest(".tomorrow");
|
||||
});
|
||||
|
||||
it("has css class dayAfterTomorrow", async () => {
|
||||
await helpers.startApplication("tests/configs/modules/calendar/custom.js", "30 Dec 2029 12:30:00 GMT");
|
||||
await doTest(".dayAfterTomorrow");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user