{"id":16314341,"url":"https://github.com/brospars/simple-calendar","last_synced_at":"2025-03-20T22:30:25.332Z","repository":{"id":40211303,"uuid":"42505332","full_name":"brospars/simple-calendar","owner":"brospars","description":"Simple calendar jquery plugin","archived":false,"fork":false,"pushed_at":"2023-07-25T09:09:57.000Z","size":824,"stargazers_count":49,"open_issues_count":6,"forks_count":38,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-11T21:53:53.649Z","etag":null,"topics":["calendar","javascript","jquery","jquery-plugin"],"latest_commit_sha":null,"homepage":"https://brospars.github.io/simple-calendar","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brospars.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"brospars"}},"created_at":"2015-09-15T08:31:39.000Z","updated_at":"2024-08-27T08:20:21.000Z","dependencies_parsed_at":"2024-10-28T09:06:41.772Z","dependency_job_id":"017f1889-db20-4452-8114-52cd0d95a7a3","html_url":"https://github.com/brospars/simple-calendar","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brospars%2Fsimple-calendar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brospars%2Fsimple-calendar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brospars%2Fsimple-calendar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brospars%2Fsimple-calendar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brospars","download_url":"https://codeload.github.com/brospars/simple-calendar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244085005,"owners_count":20395523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calendar","javascript","jquery","jquery-plugin"],"created_at":"2024-10-10T21:53:45.924Z","updated_at":"2025-03-20T22:30:24.937Z","avatar_url":"https://github.com/brospars.png","language":"JavaScript","funding_links":["https://github.com/sponsors/brospars"],"categories":[],"sub_categories":[],"readme":"# Simple Calendar\n![preview](assets/simple-calendar.gif)\n\nA simple and easy plugin to create a calendar and add events to it.\n\n## Usage\n\n### Including files\n\nYou need to include :\n- A recent version of [JQuery](https://jquery.com/)\n- The javascript file ``jquery.simple-calendar.js``\n- The stylesheet ``simple-calendar.css``\n\n```html\n\u003cscript src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"jquery.simple-calendar.js\"\u003e\u003c/script\u003e\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"simple-calendar.css\" /\u003e\n```\n\n### Simple usage\nInside a ``$(document).ready();`` function you need to call the plugin on a container jquery element :\n```javascript\n$(document).ready(function(){\n    $(\"#container\").simpleCalendar();\n});\n```\n\nThis initialize the calendar with its default settings.\n\n### Usage with options\n\nTo customize its settings simply overwrite them like below :\n\n```javascript\n$(document).ready(function(){\n    $(\"#container\").simpleCalendar({\n        //Defaults options below\n        //string of months starting from january\n        months: ['january','february','march','april','may','june','july','august','september','october','november','december'],\n        days: ['sunday','monday','tuesday','wednesday','thursday','friday','saturday'],\n        displayYear: true,              // Display year in header\n        fixedStartDay: true,            // Week begin always by monday or by day set by number 0 = sunday, 7 = saturday, false = month always begin by first day of the month\n        displayEvent: true,             // Display existing event\n        disableEventDetails: false, // disable showing event details\n        disableEmptyDetails: false, // disable showing empty date details\n        events: [],                     // List of events\n        onInit: function (calendar) {}, // Callback after first initialization\n        onMonthChange: function (month, year) {}, // Callback on month change\n        onDateSelect: function (date, events) {}, // Callback on date selection\n        onEventSelect: function() {}, // Callback on event selection - use $(this).data('event') to access the event\n        onEventCreate: function( $el ) {},          // Callback fired when an HTML event is created - see $(this).data('event')\n        onDayCreate:   function( $el, d, m, y ) {}  // Callback fired when an HTML day is created   - see $(this).data('today'), .data('todayEvents')\n    });\n});\n```\n\n#### Calendar events\n\nEvents are json object that contains `startDate`, `endDate`, and `summary`\n```javascript\nvar events = [{\n    startDate: Date|timestamp|ISOstring,\n    endDate: Date|timestamp|ISOstring,\n    summary: string\n}]\n```\n\n### Methods\n\nTo use methods, first get the plugin instance from the data properties and then use the following methods.\n```javascript\nvar container = $(\"#container\").simpleCalendar({ ...code });\nlet $calendar = container.data('plugin_simpleCalendar')\n```\n\n#### Add event\n```javascript\nvar newEvent = {\n  startDate: new Date(new Date().setHours(new Date().getHours() + 48)).toISOString(),\n  endDate: new Date(new Date().setHours(new Date().getHours() + 49)).getTime(),\n  summary: 'New event'\n}\n\n$calendar.addEvent(newEvent)\n```\n\n#### Set events\n```javascript\nvar events = [{\n  startDate: new Date(new Date().setHours(new Date().getHours() + 48)).toISOString(),\n  endDate: new Date(new Date().setHours(new Date().getHours() + 49)).getTime(),\n  summary: 'New event'\n},\n{\n  startDate: new Date(new Date().setHours(new Date().getHours() - 24)).toISOString(),\n  endDate: new Date(new Date().setHours(new Date().getHours() - 23)).getTime(),\n  summary: 'New event 2'\n}]\n\n$calendar.setEvents(events)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrospars%2Fsimple-calendar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrospars%2Fsimple-calendar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrospars%2Fsimple-calendar/lists"}