Giter Club home page Giter Club logo

Comments (6)

tkurosaka avatar tkurosaka commented on May 29, 2024

I also tried the latest version (hopefully) by getting a local copy with npm install. This time, "Uncaught ReferenceError" didn't happen but I was told calendarLink is not defined.

from calendar-link.

darkvovich avatar darkvovich commented on May 29, 2024

I have the same error but found solution.

Include this script <script src="https://cdn.jsdelivr.net/npm/calendar-link/dist/index.umd.js"></script>

Then use code like in example:

 <a class="atc-link icon-google" target="_blank" data-calendar-link="google" href="#">Google Calendar</a>
  <a class="atc-link icon-ics" target="_blank" data-calendar-link="ics" href="#">iCal</a>
<a class="atc-link icon-ical" target="_blank" data-calendar-link="outlook" href="#">Outlook Calendar</a>
<a class="atc-link icon-yahoo" target="_blank" data-calendar-link="yahoo" href="#">Yahoo! Calendar</a>
 <a class="atc-link icon-office365" target="_blank" data-calendar-link="office365" href="#">Office 365</a>
<script>
  const event = {
   start: "2021-08-29T15:00:00+0300",
  duration: [1, "hour"],
  title: "Title",
  description: "",
  location: "Internet",
   busy: true
  };
  const calendarLinkElements = document.querySelectorAll("[data-calendar-link]");
  calendarLinkElements.forEach(link => {
  link.setAttribute("href", (calendarLink[link.getAttribute("data-calendar-link")](event)));
   });
</script>

from calendar-link.

tkurosaka avatar tkurosaka commented on May 29, 2024

@darkvovich , is it possible for you to attach a complete HTML file that works? I am not sure where this <script> to go, in or , and where the import statement goes. I tried different combinations but none worked for me.

from calendar-link.

esassaman avatar esassaman commented on May 29, 2024

I can confirm this problem. This library is useless with this bug, I can't get it to work at all. It's not compatible with plain 'ol javascript, apparently. Using the UMD version did not work either.

from calendar-link.

FindingAnand avatar FindingAnand commented on May 29, 2024

⚠️ This issue has not seen any activity in the past 2 months so I'm marking it as stale. I'll close it if it doesn't see any activity in the coming week.

from calendar-link.

FindingAnand avatar FindingAnand commented on May 29, 2024

⚠️ This issue has not seen any activity in the past 2 months so I'm marking it as stale. I'll close it if it doesn't see any activity in the coming week.

from calendar-link.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.