Giter Club home page Giter Club logo

evo-calendar's Introduction

evo-calendar

Simple Modern-looking Event Calendar

NPM

Known Vulnerabilities FOSSA Status

πŸ‘€ Demo:

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

Evo Calendar Preview

πŸ’‘ 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!

βš›οΈ If you are using React, I recommend you to try this RevoCalendar

🎨 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/[email protected]/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/[email protected]/dist/jquery.min.js"></script>

<!-- Add the evo-calendar.js for.. obviously, functionality! -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/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

πŸ› οΈ Settings

Settings Type Default Description Options
theme string Default Define calendar's theme Default, Midnight Blue, Orange Coral, Royal Navy
format string 'mm/dd/yyyy' Date format Date string format
titleFormat string 'MM yyyy' Date format for calendar title Date string format
eventHeaderFormat string 'MM d, yyyy' Date format for calendar event's title Date string format
firstDayOfWeek number 0 Displayed first day of the week 0 (Sunday) - 6 (Saturday)
language string 'en' Calendar's language en, es, de, pt, fr, nl
todayHighlight boolean false Highlight today's date in calendar true, false
sidebarDisplayDefault boolean true Set default visibility of sidebar true, false
sidebarToggler boolean true Display the button for toggling the sidebar true, false
eventDisplayDefault boolean true Set default visibility of event lists true, false
eventListToggler boolean true Display the button for toggling the event lists true, false
calendarEvents array null Defined events for calendar to show Array 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

Method Argument Description
setTheme string Set/Change theme
toggleSidebar boolean (optional) Toggle sidebar display
toggleEventList boolean (optional) Toggle event list display
getActiveDate none Get the selected date
getActiveEvents none Get the event(s) of selected date
selectYear number Select year programmatically
selectMonth number (0-11) Select month programmatically
selectDate string Select date programmatically
addCalendarEvent array/object Add Calendar event(s)
removeCalendarEvent array/string Remove event(s) by their id
destroy none Well.. destroy the calendar
addCalendarEvent Method Example
  $("#evoCalendar").evoCalendar('addCalendarEvent', [
    {
      id: '09nk7Ts',
      name: "My Birthday",
      date: "February/15/2020",
      type: "birthday",
      everyYear: true
    }
  ]);

Events

Event Argument Description
selectDate newDate, oldDate Fires after selecting date
selectEvent activeEvent Fires after selecting event
selectMonth activeMonth, monthIndex Fires after selecting month
selectYear activeYear Fires after changing year
destroy calendar Fires after destroying calendar
selectDate Event Example
  $("#evoCalendar").on('selectDate', function() {
    // code here
  });

Need customization? Go here!

Go to demo page for more example! πŸ€—πŸ’œ

PayPal Me Buy Me A Coffee

πŸ” 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.

evo-calendar's People

Contributors

edlynvillegas avatar fossabot avatar joristackaert avatar thamara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evo-calendar's Issues

Current date is not shown on re-opening calendar

Hi,

I am trying to use the calendar to show my events. However, when I navigate to years/months/dates other than current date and re-open the calendar, it shows the date to which I navigated previously and not the current date (set programmatically) or the highlighted today's date.

I have tried to set the date each time the calendar is re-opened in this way but that is not helping.:

$('#evo-calendar').evoCalendar('selectDate', "January/20/2021");

It works only for the first time when calendar is generated.

Is there any workaround or anything that I am missing here?

Great Work! But..

Hi Edlyn Villegas, I like your work very much! Clean UI and user friendly! I understand its beta version.. but I just want to confirm with you, is this work in iPhone? Because I tried it myself and view it with my iPhone, it will have some NaN value for the date and picking all day as today, but its ok and working in web version and android phone, it seems like its not compatible with iOS or safari i not sure.. πŸ˜…

Despite on the flaw, overall is very good, Keep it up!

Cheers! :D

evo-calendar w/ front-end frameworks

Hi Edlyn Villegas,

I'm astonished by your great work.
I'm curious to ask if your calendar is supported
by front-end frameworks like react and angular?
Keep up the good work! πŸ₯‡

Eldrin,

Disable Previous year, month, and days

Hi Ma'am Edlyn is there a settings where can i disable the previous date? like for example today is September 30, 2020, i would like to disable all previous year from 2020, all previous month from September and all previous date from 30. Thanks and Congrat to this great work.

Will there be time picker for events?

Hi Edlyn Villegas, i really love how your calendar looks like, but it would be great if you add start and end time for events with date and hours, it would be great improvement.

Keep up with good work!

Reading the event ID of clicked event from side panel?

I've been taking a look at the event object (activeEvent) returned from clicking on an event in the event panel listing:

$('#evoCalendar').evoCalendar({
calendarEvents: myEvents,
}).on('selectEvent',function(activeEvent) {
console.log( activeEvent );
});

I want to read the clicked on event's ID but have been unable to find an actual returned target data to drill down to in the returned object. Is this not possible in the current version?

Is there provision for times zones?

Eg, if someone is viewing events in the US, there will be at a certain time.
but those same events need to appear at different times for someone viewing them in the UK.

Does Evo Cal support this?

Thanks!

[Bug] Responsive

Hi there, i'd really love your user interface. But, recently i found that on screen width around 770 and 900 when i'd open up both of the month and agenda column, the date table is overlayed to the right.

I hope that you could solved this. Thanks! :)
image

Title Month with details

Hello Edlyn,

I correctly retrieve the sum of what has been achieved during the day (console.log), ....
How can I display this sum next to the title "month" .. same thing for the days?
Thank you for your help

How to resize the calendar?

I couldnt find any function or setting to resize the calendar widget. I only have small space for the calendar and I need to resize it. Is there any way to do that? Thank you

Is jQuery really necessary?

jQuery adds almost 90kb and one extra req to the final product. Removing jQuery and using only vanilla JS will make the calendar faster, leaner and dependency-free!

To make this conversion less stressful, I suggest we could start by assigning a global $ variable to the querySelector method, so a good chunk of the code that is already written can be reused.

window.$ = document.querySelector.bind(document)
window.$$ = document.querySelectorAll.bind(document)

What do you think?

Select event 'date' of undefined

hey me again. πŸ‘‹

Been fighting off this problem for a couple of hours now.

image

This is the result i get when clicking an event. the index is -1. i'm using your latest version of the code. 1.1.2

i'm filling an event ID from the database and this is a whole bunch of numbers (42481830) in an array out of my asp.net controller -> encode to array in js. when i use id= "4hducye" for an event all seems to work fine, and index = 0. But using whole bunch of numbers it fails. :/.

so when event id is numeric == fails index = -1 and var modified_event = _.options.calendarEvents[index]; is undefined
when event id is Alfanumeriek == ok index = 0 and var modified_event = _.options.calendarEvents[index]; is defined

so not really big issue because i can fix it by just adding a letter to the Id. :)

Some issues with date range especially when date range starts from the current(today) date

Hi,
Thanks a lot for this great plugin. It is simple, useful and easy to implement.
But I just seen some issues with the date, especially when you add and event with date range.

Here is the behavior.

1- When you add an event with a date range, event starting from the current(today) date to other date, the event is not dynamically added to the current(today) eventList siderBar.

2- When you refresh the calendar(reload), event starting from the current(today) date to other date are not displayed on the current(today) eventList siderBar, you have to click on other date then on the current(today) date to see the events with date range on the current(today) eventList siderBar.

Could you have a look at this ?

Regards,

v1.1.3

Hello,
i have this error on init evo (no settings, simple init)

Uncaught TypeError: Cannot read properties of null (reading 'find')
at EvoCalendar.buildSidebarYear (evo-calendar.js:691)
at EvoCalendar.buildTheBones (evo-calendar.js:593)
at EvoCalendar.init (evo-calendar.js:243)
at new EvoCalendar (evo-calendar.js:219)
at jQuery.fn.init.$.fn.evoCalendar (evo-calendar.js:1109)
...

thanks for your help
Roger

Changing date format

If I changed the date format to dd/mm/yyyy in either evo-calendar.js or the initializing function, the day becomes month and the month becomes day in the event window. e.g. Clicking 9 May in the calendar will show 5 September in the event window.
What is the proper way of changing date format?

UX improvements

Hi! First of all this work is great! I was in need of a simple calendar and this solved my problem with more style than I was foreseeing.

Although, I have some improvement suggestions, which I would be also interested in working on. :)

image

The suggestions are:

  1. (In yellow) Reduce the size of the arrow that opens the events pane. My feeling is that it's bigger than the average heigh of the other elements.
  2. (In red) Besides the size of the button, I feel it's more intuitive to move the menu to the top to be in the same "line" as the arrow.
  3. (In green) Add some arrows in the calendar itself to make it easier to move between the months.
  4. (In blue) Add some icon/button that would make it easier to go to the current month.

@edlynvillegas Let me know what you think of these changes, and if you agree I can start working on them.

evo-calendar with MySql-Database

Hey Edlyn Villegas,
many thanks for your great work.
Is there a way to connect the calendar to a mysql database?
Best wishes
Eberhard

Using .ics file

Is it possible to use a .ics to load all the events into the calendar?

ReactJS: (R)EvoCalendar

Hi Edlyn,

I've created a React component very much inspired by Evo Calendar, and I've called it RevoCalendar. Please take a look and I'd appreciate if you could link it on Evo's Readme for people using React.

Thanks!

Event : selectEvent | activeEvent.values not equal the selected event

after using

$('#calendar').on('selectEvent', function (event, activeEvent) {
console.log(event.target);
console.log(activeEvent.description);
console.log(activeEvent.badge);
});

It works fine if u have 1 event but when u have more then 1 event on the same day its values "description..." is always the same value of the first event in the eventlist and not the selected one (the second one). unless this is intentonal.

image

I can fix it by selecting the .target childnode childnode childnode description.data but it's a bit of work.

Regards
Best calander ever btw.

Wrong styles

There is an issue with the styles, not for the plugin itself, but for the html page where you use it.
Some styles are applied in general, and no only for the context or instance of evo-calendar.
I mean, for example:

body { font-family: 'Source Sans Pro'; }
input:focus, textarea:focus, button:focus { outline: none; }
th[colspan="7"] { position: relative; }
...

There are some lines in the css that change style to all elements; First line changes font-family in the whole document, which is an issue. It should be applied only for the evo-calendar wrapper and descendants. Like:

.evo-calendar-wrapper { font-family: 'Source Sans Pro'; }
.evo-calendar-wrapper input:focus, .evo-calendar-wrapper textarea:focus, .evo-calendar-wrapper button:focus { outline: none; }
.evo-calendar-wrapper th[colspan="7"] { position: relative; }
...

I could add some css lines to fix it, but the plugin should be "ready to use". That's the only reason why I couldn't use this good plugin.

Not Working in Mozila Firexrox browser

Not Working in Mozila Firexrox browser
i am using evo calander but eventheader and event body is not displyed on mozial you can i shared screen shot
IN CROME BROWSER
Screenshot 2021-06-27 142138
and in MOZILA FIRE FOX
Screenshot 2021-06-27 142731
please help me what can i do for this issuse

Originally posted by @parulpat in #7 (comment)

Multiple event indicator in the same day

Hi, First thanks for this great plug-in.

However I can’t find where in the file .css I have to modify to allow me to display several event indicators in the same day as in the demo.

Thank you in advance.

Resizing

Hi, I love your calendar but I have a problem with it. I'm trying to fit it in a determinate space but all I can do is make it bigger or cut it. I don't know what parameters must I modify, so please, HELP <3.
image

Disable side bars on opening

Hi there,

I really love this calendar, so thanks for developing it! It's so lite and simple to configure, perfect for what I've been looking for!

Just curious if there's any way to disable the sidebars automatically opening upon page load. Currently, it will load with both the month picker and the note section open, but I'm hoping for the note section to only open upon click and not by default.

Sorry if I missed it in the documentation! I saw there was the option to remove the buttons for toggling, but not to have them closed by default.

Thanks in advance.

Question: Is there a way to add a link to the event

I have a dedicated pages for events and I would like to link to this page from the calendar or have a button with link. Is this possible or any way I can customise the look of the event to include a link?

Thanks in advance and thanks for the great plugin

Event Header Wrong

When I select any day, the Event Header appears with the wrong month and day. I tried to use other browsers and it appears everytime.
image

calendarEvents

can't get calendarEvents from database.. How can i get ?

EvoCalendar can not be destroy

when I want to destroy the calender using
$("#evoCalendar").evoCalendar('destroy');
the console show me an error with this message
Cannot read properties of null (reading 'off') at EvoCalendar.destroyEventListener

the full message :
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'off')
at EvoCalendar.destroyEventListener (evo-calendar.js?2701:477)
at EvoCalendar.destroy (evo-calendar.js?2701:250)
at jQuery.fn.init.$.fn.evoCalendar (evo-calendar.js?2701:1111)
at eval (TodayAppointment.vue?1ede:241)
at callWithErrorHandling (runtime-core.esm-bundler.js?5c40:6668)
at callWithAsyncErrorHandling (runtime-core.esm-bundler.js?5c40:6677)
at Array.hook.__weh.hook.__weh (runtime-core.esm-bundler.js?5c40:1931)
at invokeArrayFns (shared.esm-bundler.js?9ff4:552)
at unmountComponent (runtime-core.esm-bundler.js?5c40:4748)
at unmount (runtime-core.esm-bundler.js?5c40:4658)

Implementation on Vue.js

If you have some extra time , would you please implement the calendar for VueJs? I'm willing to pay beforehand as well.
Thanks in advance.

How to make range date

Hi and thank you for your great job, it's a really nice schedule.

I would like to know please, how do I put a date range on the calendar? That is, display or allow date selection from 8 days from today's date and only see the first 60 days from today's date?

Possibly add this as a npm package?

I like to manage my front-end libs with npm. I think this project would benefit from being published to npm or, at least, being added to a CDN, so it can be used quickly without us having to manually clone/download the source files.

Thanks for making this open-source, it saved me many hours of work! πŸ‘

cannot add an event

receive error TypeError: _[i].evoCalendar is undefined evo-calendar.js:1111:17

$('#calendar').evoCalendar('addCalendarEvent', {
      id: 'shiur1',
      name: 'Shiur: The Greeks are Coming',
      date: 'September 27, 2021',
      type: 'shiur',
      everyYear: false 
} )

Event Type can't have special characters.

hey me again. πŸ‘‹πŸ‘‹

image

An event Type can't have a special character in the string. like % , & , @ , # , Β§ ...

again sorry to bother you. and again not a big issue. but it seems the Type needs validation.

Regards.

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.