Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

[MagicMirror] calender refactoring #18

Open
Ax-LED opened this issue Dec 22, 2018 · 2 comments
Open

[MagicMirror] calender refactoring #18

Ax-LED opened this issue Dec 22, 2018 · 2 comments
Labels
core enhancement New feature or request

Comments

@Ax-LED
Copy link

Ax-LED commented Dec 22, 2018

Hi to all MM-Builders,

as i want to use my MM as replacement for a analog family cardboard calendar i have following question/request.

Is there calendar module, where i can “scroll” throuh the dates?
As i have a rotary encoder connected to my pi 3 - sending of notifications is no problem.
Something like “+7” or “-7” (days).

I checked the default calendar module and guess i have to add “notification received”, but i dont understand, how the module reads an .ics file.

Is it possible to set a start date, from which the calender entries should be shown?
So i could manipulate the startdate by notifications from my rotary module (MMM-Navigate).

Maybe someone has a tip where i can start.

Thanks in advance.

AxLED

Hi to all,

i checked the default calendar module and found an approach:
If i manipulate following code:
calendar.js, Line 338:
var today = moment().startOf("day");’ to var today = moment().subtract(60,'d').startOf("day");

and

calendarfetcher.js, Line 74:
var today = moment().startOf("day").toDate(); to var today = moment().subtract(60,'d').startOf("day").toDate();

the calendar module of my MM will show calendar entries starting Date of two month ago (today-60 days).

Now i have to add following functions:

notification received function for ±5 days (for example)
manipulate variable today with value of notification received
pass variable today to the right place in code of calender.js and calendarfetcher.js
refresh module after receiving notification
stop sending notification from calendar to other modules, in case variable today is manipulated

Sources: https://momentjs.com/docs/#/manipulating/add/

Greets

AxLED

Link https://forum.magicmirror.builders/topic/7500/calendar-module-interaction-scrollable-different-start-dates/2

@fewieden fewieden added enhancement New feature or request core labels Dec 23, 2018
@fewieden fewieden changed the title [Magicmirror] calender refactoring [MagicMirror] calender refactoring Dec 23, 2018
@fewieden
Copy link
Owner

@Ax-LED did you had a look at https://github.com/eouia/MMM-CalendarExt, someone mentioned this module to me but I can't find it anymore. This allows a big set of modifications with notifgications already.

@Ax-LED
Copy link
Author

Ax-LED commented Dec 27, 2018

@fewieden i only checked the Readme of MMM-CalendarExt on github and i didnt like the style. So i tried to modifiy the original calendar module (i like its plain style).
AxLED

@fewieden fewieden added this to ToDos Jul 9, 2022
@fewieden fewieden removed this from ToDos Jul 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants