A javascript drag and drop event calendar, that is fully responsive and compatible with all modern browsers.
$ dotnet add package jCalendar.js📅 One of the world's easiest, most powerful, and fully responsive JavaScript Calendars!
All modern browsers (such as Google Chrome, FireFox, and Opera) are fully supported.
ar Arabicbn Bengalibg Bulgarianzh Chinese (simplified)da Danishnl Dutchen English (default)fi Finnishfr Frenchka Georgiande Germanel Greekhi Hindihu Hungarianir Italianja Japaneseko Koreanlv Latvianlt Lithuanianno Norwegianpl Polishpt Portuguesero Romanianes Spanishsv Swedishtr Turkishuk UkrainianTo see a list of all the most recent changes, click here.
To get started using Calendar.js, do the following steps:
Make sure you include the "DOCTYPE html" tag at the top of your email, as follows:
<!DOCTYPE html>
<link rel="stylesheet" href="dist/calendar.js.css">
<script src="dist/calendar.js"></script>
<div id="calendar"></div>
<script>
var calendarInstance1 = new calendarJs( "calendar", {
manualEditingEnabled: true
// All your options can be set here
} );
// OR
var calendarElement = document.getElementById( "calendar" );
var calendarInstance2 = new calendarJs( calendarElement, {
manualEditingEnabled: true
// All your options can be set here
} );
</script>
You can also create new Calendars using the jQuery Plugin, or by using Data Bindings. See the test HTML files for examples.
That's it! Nice and simple. Please refer to the code if you need more help (fully documented).
To customize, and get more out of Calendar.js, please read through the following documentation.
Options (which can be set when initializing, or afterwards) allow you to customize how Calendar.js will look and function. The options are also used to set the custom triggers you want to fire when specific actions occur. You can set them manually as follows:
<script>
calendarInstance.setOptions( {
manualEditingEnabled: false,
views: {
fullMonth: {
maximumEventsPerDayDisplay: 0
}
},
visibleDays: [ 0, 1, 2, 3, 4 ]
} );
</script>
To see a list of all the available options you can use, click here.
To see a list of all the available custom triggers you can use, click here.
An event is defined as a JavaScript object, as follows:
<script>
var event = {
from: new Date(),
to: new Date(),
title: "A New Event",
description: "A description of the event"
};
</script>
You can add a new event by using one of the add public functions, as follows:
<script>
calendarInstance.addEvent( event );
</script>
To see a list of all the available event properties and how they should be formatted, click here.
A holiday is a piece of text that is shown under the day number in the month it is assigned to. You can set these holidays in the options, or add them manually as follows:
<script>
var holiday = {
day: today.getDate(),
month: today.getMonth() + 1,
title: "A New Holiday",
};
// This is a public function that you can call
calendarInstance.addHolidays( [ holiday ] );
</script>
To see a list of all the available holiday properties and how they should be formatted, click here.
To see a list of all the public functions available, click here.
Search Options allow you to customize how Calendar.js Search dialog will function. You can set them manually as follows:
<script>
calendarInstance.setSearchOptions( {
matchCase: false
} );
</script>
To see a list of all the available search options you can use, click here.