Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/munya-marinda/m-calendar

Easily integrating a customizable calendar into your web projects.
https://github.com/munya-marinda/m-calendar

calendar css events frontend html javascript-library mcalendar open-source scheduling ui-components web-development

Last synced: 9 days ago
JSON representation

Easily integrating a customizable calendar into your web projects.

Awesome Lists containing this project

README

        

# MCalendar

![MCalendar](https://github.com/Munya-Marinda/m-calendar/assets/84540577/14534007-3e3a-4c43-a175-734d2318edd1)
![mcalender](https://github.com/Munya-Marinda/m-calendar/assets/84540577/b776a2b6-ab00-4d0e-8ce3-c5e1712e0787)

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 `` of your HTML file.

```html

```

2. **Create a Container**: Add a `

` with the ID "calendar-container" where you want the calendar to appear.

```html


```

3. **Include JavaScript**: Link to the MCalendar JavaScript file just before the closing `` tag.

```html

```

4. **Initialize MCalendar**: Use JavaScript to create an instance of MCalendar and pass your configuration.

```html

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

```

## Configuration

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

```javascript
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!