Skip to content

monsterbrain/simple-calendar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Calendar

preview

A simple and easy plugin to create a calendar and add events to it.

Usage

Including files

You need to include :

  • A recent version of JQuery
  • The javascript file jquery.simple-calendar.js
  • The stylesheet simple-calendar.css
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.simple-calendar.js"></script>
<link rel="stylesheet" type="text/css" href="simple-calendar.css" />

Simple usage

Inside a $(document).ready(); function you need to call the plugin on a container jquery element :

$(document).ready(function(){
    $("#container").simpleCalendar();
});

Events Preview

preview

This initialize the calendar with its default settings.

Usage with options

To customize its settings simply overwrite them like below :

$(document).ready(function(){
    $("#container").simpleCalendar({
        //Defaults options below
        //string of months starting from january
        months: ['january','february','march','april','may','june','july','august','september','october','november','december'], //string of months starting from january
        days: ['sunday','monday','tuesday','wednesday','thursday','friday','saturday'], //string of days starting from sunday
        minDate : "YYYY-MM-DD", // minimum date
        maxDate : "YYYY-MM-DD", // maximum date
        insertEvent: true, // can insert events
        displayEvent: true, // display existing event
        fixedStartDay: true, // Week begin always by monday
        events: [], //List of events
        selectCallback: function (selDate) { }, // Callback on date select
        insertCallback : function(){} // Callback when an event is added to the calendar
    });
});

updates

  • 2019 September 25

Fixed Date callback bug fix (thanks to Franco Vilotta) Added Year changed demo screen shot

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 82.3%
  • CSS 17.7%