{"id":13992092,"url":"https://github.com/hanse/react-calendar","last_synced_at":"2025-04-05T06:10:03.500Z","repository":{"id":17539637,"uuid":"20342322","full_name":"hanse/react-calendar","owner":"hanse","description":"React.js Calendar Component (npm install react-calendar-component) 📅","archived":false,"fork":false,"pushed_at":"2023-11-06T17:12:45.000Z","size":1768,"stargazers_count":144,"open_issues_count":25,"forks_count":113,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T05:07:55.107Z","etag":null,"topics":["calendar","datepicker","react"],"latest_commit_sha":null,"homepage":"http://hanse.github.io/react-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/hanse.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-05-30T20:59:48.000Z","updated_at":"2024-09-16T20:21:10.000Z","dependencies_parsed_at":"2024-01-18T03:49:02.056Z","dependency_job_id":null,"html_url":"https://github.com/hanse/react-calendar","commit_stats":{"total_commits":62,"total_committers":5,"mean_commits":12.4,"dds":0.4838709677419355,"last_synced_commit":"f963bcffc8ce42d5f56277e0a65932fa4279d84f"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanse%2Freact-calendar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanse%2Freact-calendar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanse%2Freact-calendar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanse%2Freact-calendar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hanse","download_url":"https://codeload.github.com/hanse/react-calendar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294541,"owners_count":20915340,"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","datepicker","react"],"created_at":"2024-08-09T14:01:47.093Z","updated_at":"2025-04-05T06:10:03.480Z","avatar_url":"https://github.com/hanse.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# react-calendar\n\n[React](http://facebook.github.io/react/) calendar component inspired by\n[CLNDR.js](http://kylestetz.github.io/CLNDR/).\n\n```\n$ npm install react-calendar-component\n```\n\nNote: the npm name is `react-calendar-component`!\n\nThis is a low-level component for rendering monthly calendars using React. The\ncomponent will call `renderDay` and `renderHeader` functions provided by you to\nmake a calendar for the month of the given `Date`. Very basic default\nimplementations are provided for both, but they can be overridden to fit your\nuse case. This\n[example](https://github.com/Hanse/react-calendar/tree/master/examples/basic)\nshows how to create a regular grid calendar.\n\n# Live Demo\n\nhttp://hanse.github.io/react-calendar/\n\n# Usage\n\n```js\nimport React, { Component } from 'react';\nimport { render } from 'react-dom';\nimport { Calendar } from 'react-calendar-component';\nimport moment from 'moment';\nimport 'moment/locale/nb';\n\nclass CalendarExample extends Component {\n  state = {\n    date: moment()\n  };\n\n  render() {\n    return (\n      \u003cCalendar\n        onChangeMonth={date =\u003e this.setState({ date })}\n        date={this.state.date}\n        onPickDate={date =\u003e console.log(date)}\n        renderDay={({ day, classNames, onPickDate }) =\u003e (\n          \u003cdiv\n            key={day.format()}\n            className={cx(\n              'Calendar-grid-item',\n              day.isSame(moment(), 'day') \u0026\u0026 'Calendar-grid-item--current',\n              classNames\n            )}\n            onClick={e =\u003e onPickDate(day)}\n          \u003e\n            {day.format('D')}\n          \u003c/div\u003e\n        )}\n        renderHeader={({ date, onPrevMonth, onNextMonth }) =\u003e (\n          \u003cdiv className=\"Calendar-header\"\u003e\n            \u003cbutton onClick={onPrevMonth}\u003e«\u003c/button\u003e\n            \u003cdiv className=\"Calendar-header-currentDate\"\u003e\n              {date.format('MMMM YYYY')}\n            \u003c/div\u003e\n            \u003cbutton onClick={onNextMonth}\u003e»\u003c/button\u003e\n          \u003c/div\u003e\n        )}\n      /\u003e\n    );\n  }\n}\n\nrender(\u003cCalendarExample /\u003e, document.getElementById('calendar'));\n```\n\n# License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanse%2Freact-calendar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanse%2Freact-calendar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanse%2Freact-calendar/lists"}