1.1.3 • Published 4 years ago

evo-calendar v1.1.3

Weekly downloads
101
License
MIT
Repository
github
Last release
4 years ago

evo-calendar

Simple Modern-looking Event Calendar

NPM

npm.io Known Vulnerabilities FOSSA Status

:eyes: Demo:

https://edlynvillegas.github.io/evo-calendar/

Evo Calendar Preview

:bulb: Features:

  • Flexible and fully customizable
  • Responsive Calendar (desktop, tablet and mobile)
  • Add, Remove and View single/multiple calendar events
  • Set event type (event, holiday, birthday)
  • Events and methods that lets you think outside the box!

:atom_symbol: If you are using React, I recommend you to try this RevoCalendar

:art: Usage

CDN

Start working with Evo Calendar using CDN (jsDelivr)

Adding links using jsDelivr:

Just add a link to the css file in your <head>:

<!-- Add the evo-calendar.css for styling -->
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/evo-calendar@1.1.2/evo-calendar/css/evo-calendar.min.css"/>

Then, before your closing <body> tag add:

<!-- Add jQuery library (required) -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script>

<!-- Add the evo-calendar.js for.. obviously, functionality! -->
<script src="https://cdn.jsdelivr.net/npm/evo-calendar@1.1.2/evo-calendar/js/evo-calendar.min.js"></script>

Initialization:

In your html file:

<div id="calendar"></div>

Then in your javascript file:

<script>
  $("#calendar").evoCalendar();
</script>

Package Managers:

# NPM
$ npm install evo-calendar

# YARN
$ yarn add evo-calendar

:hammer_and_wrench: Settings

SettingsTypeDefaultDescriptionOptions
themestringDefaultDefine calendar's themeDefault, Midnight Blue, Orange Coral, Royal Navy
formatstring'mm/dd/yyyy'Date formatDate string format
titleFormatstring'MM yyyy'Date format for calendar titleDate string format
eventHeaderFormatstring'MM d, yyyy'Date format for calendar event's titleDate string format
firstDayOfWeeknumber0Displayed first day of the week0 (Sunday) - 6 (Saturday)
languagestring'en'Calendar's languageen, es, de, pt, fr, nl
todayHighlightbooleanfalseHighlight today's date in calendartrue, false
sidebarDisplayDefaultbooleantrueSet default visibility of sidebartrue, false
sidebarTogglerbooleantrueDisplay the button for toggling the sidebartrue, false
eventDisplayDefaultbooleantrueSet default visibility of event liststrue, false
eventListTogglerbooleantrueDisplay the button for toggling the event liststrue, false
calendarEventsarraynullDefined events for calendar to showArray of events

calendarEvent Options Example

  $("#evoCalendar").evoCalendar({
    calendarEvents: [
      {
        id: 'bHay68s', // Event's ID (required)
        name: "New Year", // Event name (required)
        date: "January/1/2020", // Event date (required)
        type: "holiday", // Event type (required)
        everyYear: true // Same event every year (optional)
      },
      {
        name: "Vacation Leave",
        badge: "02/13 - 02/15", // Event badge (optional)
        date: ["February/13/2020", "February/15/2020"], // Date range
        description: "Vacation leave for 3 days.", // Event description (optional)
        type: "event",
        color: "#63d867" // Event custom color (optional)
      }
    ]
  });

Methods

MethodArgumentDescription
setThemestringSet/Change theme
toggleSidebarboolean (optional)Toggle sidebar display
toggleEventListboolean (optional)Toggle event list display
getActiveDatenoneGet the selected date
getActiveEventsnoneGet the event(s) of selected date
selectYearnumberSelect year programmatically
selectMonthnumber (0-11)Select month programmatically
selectDatestringSelect date programmatically
addCalendarEventarray/objectAdd Calendar event(s)
removeCalendarEventarray/stringRemove event(s) by their id
destroynoneWell.. destroy the calendar
addCalendarEvent Method Example
  $("#evoCalendar").evoCalendar('addCalendarEvent', [
    {
      id: '09nk7Ts',
      name: "My Birthday",
      date: "February/15/2020",
      type: "birthday",
      everyYear: true
    }
  ]);

Events

EventArgumentDescription
selectDatenewDate, oldDateFires after selecting date
selectEventactiveEventFires after selecting event
selectMonthactiveMonth, monthIndexFires after selecting month
selectYearactiveYearFires after changing year
destroycalendarFires after destroying calendar
selectDate Event Example
  $("#evoCalendar").on('selectDate', function() {
    // code here
  });

Need customization? Go here!

Go to demo page for more example! :hugs::purple_heart:

:mag: License

FOSSA Status

MIT License

Copyright (c) 2020 edlynvillegas

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago