Skip to content
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

Implement "Add to Calendar" for Repeated Events #558

Open
vsoch opened this issue Oct 22, 2021 · 0 comments
Open

Implement "Add to Calendar" for Repeated Events #558

vsoch opened this issue Oct 22, 2021 · 0 comments

Comments

@vsoch
Copy link
Member

vsoch commented Oct 22, 2021

Currently, the add to calendar button can work easily for a non-repeated event because we have a reliable date and time from the event markdown directly. Repeated events are generated by the fullcalendar plugin so we don't have this, so we can't populate the javascript call. A solution to this problem would (I think) be able to associate the date from the calendar with a link to the page, possibly as a GET variable, and then have the page read it into the calendar button login. In other words, here is how I would do this:

  1. Figure out how to get the actual (calculated) date time for an event, and add it to a data attribute somewhere
  2. Hijack the event on click (event.preventDefault) and retrieve this value, add it to the url that would have been clicked
  3. On the event page, retrieve the variable from the GET and use it to populate the add to calendar button.

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant