Skip to content

This is a JavaScript calendar that is intended to be flexible for entering events or reminders on certain dates.

License

Notifications You must be signed in to change notification settings

drdrjojo/calendarjs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CalendarJS

This is a JavaScript calendar that is intended to be flexible for entering events or reminders on certain dates.

How to use

  • Load CalendarJS.js and DefaultStyle.css into your project.
  • Instantiate the CalendarJS class in your application and enter the div ID that will receive CalendarJS:
    const calendarJS = new Calendar();
    calendarJS.render('#calendar');
  • You can insert events using the addEvents method like this:
    calendarJS.addEvents(
    [
         {
            name    : 'DocePipoca',
            date    : '17-3-2019',
            time    : '22:00',
            author   : 'Mario',
            link    : 'link to the event',
        },
         {
            name    : 'Event Name',
            data    : '10-10-2018',
            time    : '07:00',
            author   : 'Jeconias',
            link    : 'link to the event',
        }
    ]);

  • You can render the calendar before or after entering events:
    const calendarJS = new Calendar();
    calendarJS.render('#calendar').addEvents(arrayObj);

    // ou

    calendarJS.addEvents(arrayObj).render('#calendar');

Available Methods

Method Parameters Action Return
render ID Render the calendar Returns public methods
addEvents Object Array Inserts events to calendar --

Changelog

  • v0.1 - initiated ;)

Current calendar style:

Current calendar style

When you click on an event date:

Current calendar style

About

This is a JavaScript calendar that is intended to be flexible for entering events or reminders on certain dates.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 58.6%
  • CSS 36.2%
  • HTML 5.2%