A Customizable Calendar JavaScript UI Widget/Component Library

Color Calendar is a customizable event calendar component library. Flexible, customizable, and themed events calendar and month/year picker component written in Vanilla JavaScript.

dynamic calendar in javascript with example responsive event calendar jquery, event calendar jquery, javascript event calendar source code, html event calendar code

How to make use of it:

1. Install & import the Color Calendar as an ES module.

# NPM
$ npm i color-calendar
import Calendar from 'color-calendar';
import 'color-calendar/dist/css/theme-basic.css';
import 'color-calendar/dist/css/theme-glass.css';

2. Or instantly load the JavaScript and CSS files within the doc.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/color-calendar/dist/css/theme-basic.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/color-calendar/dist/css/theme-glass.css" />
<script src="https://cdn.jsdelivr.net/npm/color-calendar/dist/bundle.min.js"></script>

3. Create a container to carry the occasion calendar.

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

4. Initialize the calendar and performed.

new Calendar({
    id: '#color-calendar',
})

5. Initialize the calendar with events.

const myEvents = [
      {
        start: '2021-04-15T06:00:00',
        end: '2021-04-15T20:30:00',
        name: 'Event 1',
        url: '',
        desc: 'Description 1',
        // more key value pairs here
      },{
        start: '2021-04-16T06:00:00',
        end: '2021-04-16T20:30:00',
        name: 'Event 2',
        url: '',
      },{
        start: '2021-04-16T06:00:00',
        end: '2021-04-17T20:30:00',
        name: 'Event 3',
        url: '',
      },
],
new Calendar({
    id: '#color-calendar',
    eventsData: myEvents,
})

6. Available choices to customize the event calendar.

new Calendar({

    // small or large
    calendarSize: 'large',

    // an array of layout modifiers
    layoutModifiers: 'month-align-left',
    
    // basic | glass
    theme: 'glass',

    // custom colors
    primaryColor: '#1a237e',
    headerColor: 'rgb(0, 102, 0)',
    headerBackgroundColor: 'black',
    weekdaysColor: 'based on theme',

    // short | long-lower | long-upper
    weekdayDisplayType: 'short',

    // short | long
    monthDisplayType: 'long',

    // 0 (Sun)
    startWeekday: 0,

    // font family
    fontFamilyHeader: 'based on theme',
    fontFamilyWeekdays: 'based on theme',
    fontFamilyBody: 'based on theme',

    // shadow CSS
    dropShadow: 'based on theme',

    // border CSS
    border: based on theme',

    // border radius
    borderRadius: '0.5rem',

    // disable month year pickers
    disableMonthYearPickers: false,

    // disable click on dates
    disableDayClick: false,

    // disable the arrows to navigate between months
    disableMonthArrowClick: false
    
})

7. Events.

new Calendar({
    dateChanged: (currentDate, DateEvents) => {
      // do something
    },
    monthChanged: (currentDate, DateEvents) => {
      // do something
    };
})

8. API occasions.

// set date 
instance.setDate(date);

// reset 
instance.reset();

// get selected date
instance.getSelectedDate();

// set events 
instance.setEventsData(eventArray);

// add events
instance.addEventsData(eventArray)

// get event data
instance.getEventsData();

// set weekday display type
instance.setWeekdayDisplayType(type);

// set month display type
instance.setMonthDisplayType(type);

Customizable Event Calendar With Month/Year Selection, Color Calendar Plugin/Github, calendar code in javascript, simple javascript calendar, calendar js


See Demo And Download

Official Website(PawanKolhe): Click Here

This superior jQuery/javascript plugin is developed by PawanKolhe. For extra Advanced usage, please go to the official website.

Related Posts

drag-drop-file-5x5-jq-uploader

Responsive Drag and Drop File Uploader/Download Plugin | 5x5_jq_uploader

5x5_jq_uploader plugin can be used to instantly create a drop file area and file queue with a little bit of preparation. Bootstrap is used for responsive planning…

Bootstrap-Dark-Mode

Stylesheet For Implementing Dark Mode with Bootstrap

Bootstrap Dark Mode provides a style sheet and two texts that allow you to implement Dark Mode on your website. Initially loaded based on user preferences, can…

responsive-navigation-menu

Multi-purpose Navigation Menu for Javascript Library | jQuery Corenav

coreNavigation is a multipurpose navigation menu for a jquery based javascript library, comes with more style, and is easy to integrate. 11 Default Menu 2 Responsive Navigation…

Simple-Multi-Select-Dropdown-Pure-Vanilla-Javascript

Simple Multi-Select Dropdown Pure Vanilla Javascript | multiSelect.js

MultiSelect.js is a simple, clean, and progressive JavaScript library designed for easy integration with any type of project or system. The design was heavily influenced by the…

Confetti-Falling-Animation-Effect-party

Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…

how-to-create-popup-in-html-with-css

How To Create A Popup in HTML with CSS

How to create popup in html with css – Popup without JavaScript is an elegant pop-up panel component with an animated scale, written in CSS. Have you…