Code Monkey home page Code Monkey logo

m-calendar's Introduction

MCalendar

MCalendar mcalender

MCalendar is a lightweight JavaScript library for easily integrating a customizable calendar into your web projects. It provides an intuitive interface to display events, deadlines, meetings, or any other date-related information. MCalendar is designed with simplicity and flexibility in mind, making it easy to use and customize according to your needs.

Getting Started

To use MCalendar, follow these simple steps:

  1. Include Stylesheet: Link to the MCalendar stylesheet in the <head> of your HTML file.

    <link rel="stylesheet" href="m-calendar.css" />
  2. Create a Container: Add a <div> with the ID "calendar-container" where you want the calendar to appear.

    <div id="calendar-container"></div>
  3. Include JavaScript: Link to the MCalendar JavaScript file just before the closing </body> tag.

    <script src="m-calendar.js"></script>
  4. Initialize MCalendar: Use JavaScript to create an instance of MCalendar and pass your configuration.

    <script>
      document.addEventListener("DOMContentLoaded", function () {
        const calendarContainer = document.getElementById("calendar-container");
        const mcalendar = new MCalendar(calendarContainer, {
          events: [
            // Add your events here
          ],
        });
        mcalendar.render();
      });
    </script>

Configuration

MCalendar is highly configurable. You can customize the appearance and behavior by providing options in the configuration object. For example:

const mcalendar = new MCalendar(calendarContainer, {
  events: [
    // Your events here
  ],
  // Additional configuration options go here
});

Event Structure

Events are structured as objects with specific properties:

  • title: The title of the event.
  • start_date: The start date and time of the event.
  • end_date: The end date and time of the event.
  • color: The text color of the event.
  • background_color: The background color of the event.

Feel free to contribute, report issues, or customize the code to suit your project's needs. Enjoy using MCalendar!

m-calendar's People

Contributors

munya-marinda avatar

Watchers

 avatar

m-calendar's Issues

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.