buCalendar

Simple library to create buttons to add events to your calendar.


Repository

See the repository here.


Test the result

Click in those buttons to add event to yours calendars.




Installation

Just include the js and css files in you web page.

<link href="https://cdn.jsdelivr.net/gh/assisfery/buCalendar@1.2/css/buCalendar.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/gh/assisfery/buCalendar@1.2/js/buCalendar.min.js"></script>


Dependences

buCalendar depends on moment library, so we should import it.

<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.27.0/moment.min.js"></script>

Setup

Create calendar buttons in simple way.

buCalendar.setup("#buttons-area",
{
    name: "Event 1",
    details: "The best event",
    startDate: "2021-06-17 20:30:00", // YYYY-MM-DD HH:mm:ss in UTC
    endDate: "2021-06-17 21:00:00", // YYYY-MM-DD HH:mm:ss in UTC
    location: "Cabo Verde"
},
[
    {
        name: "Google",
        //addQueryString: "&add=user@example.com"
    },
    {
        name: "Yahoo",
        //content: "Yahoo Calendar"
    },
    {
        name: "Outlook",
    },
    {
        name: "Office 365",
    },
    {
        name: "ICS file",
    },
],
"bc-pill"
);

More samples

You can find more samples here.