{"id":16188288,"url":"https://github.com/konsumer/mithril-calendar","last_synced_at":"2025-03-19T03:30:40.228Z","repository":{"id":27027598,"uuid":"30492325","full_name":"konsumer/mithril-calendar","owner":"konsumer","description":"A calendar component for mithril","archived":false,"fork":false,"pushed_at":"2016-06-17T19:21:53.000Z","size":13,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"gh-pages","last_synced_at":"2025-02-28T14:49:50.571Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/konsumer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-08T13:47:57.000Z","updated_at":"2016-06-17T04:53:09.000Z","dependencies_parsed_at":"2022-08-03T06:30:34.348Z","dependency_job_id":null,"html_url":"https://github.com/konsumer/mithril-calendar","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fmithril-calendar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fmithril-calendar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fmithril-calendar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fmithril-calendar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/konsumer","download_url":"https://codeload.github.com/konsumer/mithril-calendar/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243965752,"owners_count":20375917,"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":[],"created_at":"2024-10-10T07:25:48.619Z","updated_at":"2025-03-19T03:30:39.947Z","avatar_url":"https://github.com/konsumer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mithril-calendar\n\nA calendar component for mithril.\n\n[![NPM](https://nodei.co/npm/mithril-calendar.png?compact=true)](https://nodei.co/npm/mithril-calendar/)\n\nYou can see a demo [here](http://konsumer.github.io/mithril-calendar).\n\n## installation\n\nYou can get a copy with bower or npm or just download it from the `dist/` folder, here.\n\n### webpack/browserify/etc\n\n```js\nvar MithrilCalendar = require('mithril-calendar');\n```\n\n### requirejs\n\n```js\ndefine(['mithril','MithrilCalendar'], function(m,MithrilCalendar){\n  \n});\n```\n\n### plain browser globals\n```html\n\u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/mithril/0.1.30/mithril.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"http://konsumer.github.io/mithril-calendar/dist/MithrilCalendar.min.js\"\u003e\u003c/script\u003e\n```\n\n## usage\n\nHave a look at `index.js` to see how to construct the view, if you don't want it to look like mine, or want to leave out links or whatever, just construct your own view from stuff exposed in the controller.\n\n```js\nvar MyComponent = {\n  controller: function(){\n    var now = new Date();\n    this.year = m.route.param('year') ? m.route.param('year') : now.getFullYear();\n    this.month = m.route.param('month') ? m.route.param('month') : now.getMonth()+1;\n    this.calendar = new MithrilCalendar.controller(this.year, this.month);\n  },\n  view: function(ctrl){\n    return MithrilCalendar.view(ctrl.calendar);\n  }\n}\n```\n\nYou will also need some CSS. I use LESS, so you can use that from `dist/MithrilCalendar.less` or the CSS file I built from it.\n\nYou can also get it via CDN, like this:\n\n```html\n\u003clink href=\"http://konsumer.github.io/mithril-calendar/dist/MithrilCalendar.min.css\" media=\"all\" rel=\"stylesheet\" type=\"text/css\" /\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonsumer%2Fmithril-calendar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonsumer%2Fmithril-calendar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonsumer%2Fmithril-calendar/lists"}