{"id":15621578,"url":"https://github.com/richardtop/calendarkit","last_synced_at":"2025-05-13T21:04:32.515Z","repository":{"id":39616218,"uuid":"44537782","full_name":"richardtop/CalendarKit","owner":"richardtop","description":"📅 Calendar for Apple platforms in Swift","archived":false,"fork":false,"pushed_at":"2025-04-22T18:41:51.000Z","size":729,"stargazers_count":2602,"open_issues_count":33,"forks_count":354,"subscribers_count":49,"default_branch":"master","last_synced_at":"2025-04-28T13:58:47.416Z","etag":null,"topics":["calendar","calendarkit","catalyst","cocoapods","ios","ios-calendar","ios-lib","ios-swift","ios-ui","macos","swift","swift-package-manager"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=cJ63-_z1qg8","language":"Swift","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/richardtop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-10-19T13:45:05.000Z","updated_at":"2025-04-25T19:52:41.000Z","dependencies_parsed_at":"2024-01-02T21:15:09.704Z","dependency_job_id":"3e5aefaf-763b-4b21-8110-8954f031903d","html_url":"https://github.com/richardtop/CalendarKit","commit_stats":{"total_commits":763,"total_committers":46,"mean_commits":16.58695652173913,"dds":0.7234600262123199,"last_synced_commit":"e54a67fc7ab00865d2f75a1baf71f57c7a80531c"},"previous_names":[],"tags_count":118,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardtop%2FCalendarKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardtop%2FCalendarKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardtop%2FCalendarKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardtop%2FCalendarKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richardtop","download_url":"https://codeload.github.com/richardtop/CalendarKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254028444,"owners_count":22002253,"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","calendarkit","catalyst","cocoapods","ios","ios-calendar","ios-lib","ios-swift","ios-ui","macos","swift","swift-package-manager"],"created_at":"2024-10-03T09:51:06.854Z","updated_at":"2025-05-13T21:04:32.497Z","avatar_url":"https://github.com/richardtop.png","language":"Swift","readme":"![CalendarKit](https://user-images.githubusercontent.com/8013017/146282209-191d8550-3cfa-45f5-bd82-6a9d2b53bc6f.png#gh-dark-mode-only)\n![CalendarKit](https://user-images.githubusercontent.com/8013017/146282215-41e228cc-2724-4722-ba16-3126c47730c8.png#gh-light-mode-only)\n[![License](https://img.shields.io/github/license/richardtop/calendarkit)](https://swiftpackageindex.com/richardtop/CalendarKit)\n[![SwiftPM compatible](https://img.shields.io/badge/SwiftPM-compatible-orange.svg)](https://swiftpackageindex.com/richardtop/CalendarKit) \n[![Swift Compatibility](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Frichardtop%2FCalendarKit%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/richardtop/CalendarKit)\n[![Platform Compatibility](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Frichardtop%2FCalendarKit%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/richardtop/CalendarKit)\n[![Tag](https://img.shields.io/github/v/tag/richardtop/calendarkit)](https://cocoapods.org/pods/CalendarKit)\n[![Version](https://img.shields.io/cocoapods/v/CalendarKit)](https://cocoapods.org/pods/CalendarKit)\n\n\n[![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCx1gvWpy5zjOd7yZyDwmXEA?style=social)](https://www.youtube.com/channel/UCx1gvWpy5zjOd7yZyDwmXEA?sub_confirmation=1)\n[![Twitter](https://img.shields.io/twitter/follow/richardtop_ios?style=social)](https://twitter.com/richardtop_ios)\n[![GitHub followers](https://img.shields.io/github/followers/richardtop?style=social)](https://github.com/richardtop)\n\n\n[Richard Topchii on Telegram](https://t.me/richardtop)\n\n# CalendarKit\n**CalendarKit** is a Swift calendar UI library for iOS and Mac Catalyst. It looks similar to the Apple Calendar app out-of-the-box, while allowing customization when needed. CalendarKit is composed of multiple modules which can be used together or independently.\n\n## Tutorials\n- [Create iOS Calendar App in Swift with CalendarKit - Official Tutorial](https://www.youtube.com/watch?v=cJ63-_z1qg8)\n- [Live Programming with CalendarKit - For Beginners](https://www.youtube.com/watch?v=krIfO3s3ZrM)\n\n## Need Help?\nIf you have a **programming question** about how to use CalendarKit in your application, [Create a new GitHub Issue with the question tag](https://github.com/richardtop/CalendarKit/issues/new?assignees=\u0026labels=question\u0026projects=\u0026template=question.md\u0026title=).\n\nCheck out the [Sample App](https://github.com/richardtop/CalendarApp) for reference.\n\n[Create a new Issue from template](https://github.com/richardtop/CalendarKit/issues/new/choose) to report a bug or request a new feature.\n\n\n## Examples\n[Video](https://www.youtube.com/watch?v=Fi-Qqp9BaAs)\n\n[Sample App](https://github.com/richardtop/CalendarApp)\n\n## Installation\nCalendarKit can be installed with Swift Package Manager or with CocoaPods.\n### Swift Package Manager (Xcode 12 or higher)\n\nThe preferred way of installing CalendarKit is via the [Swift Package Manager](https://swift.org/package-manager/).\n\n1. In Xcode, open your project and navigate to **File** → **Swift Packages** → **Add Package Dependency...**\n2. Paste the repository URL (`https://github.com/richardtop/CalendarKit.git`) and click **Next**.\n3. For **Rules**, select **Version (Up to Next Major)** and click **Next**.\n4. Click **Finish**.\n\n[Adding Package Dependencies to Your App](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app)\n\n### CocoaPods\n⚠️ Warning: CocoaPods support is deprecated and will be removed at a later date. It's recommended to migrate your installation of CalendarKit to using Swift Package Manager.\n\nTo install it, add the following line to your Podfile:\n\n```ruby\npod 'CalendarKit'\n```\n[Adding Pods to an Xcode project](https://guides.cocoapods.org/using/using-cocoapods.html)\n\n## Usage\n1. Subclass `DayViewController`\n2. Implement `EventDataSource` protocol to show events.\n\nCalendarKit requires `EventDataSource` to return an array of objects conforming to `EventDescriptor` protocol, specifying all the information needed to display a particular event. You're free to use a default `Event` class as a model or create your own class conforming to the `EventDescriptor` protocol.\n\n```swift\n// Return an array of EventDescriptors for particular date\noverride func eventsForDate(_ date: Date) -\u003e [EventDescriptor] {\n  var models = myAppEventStore.getEventsForDate(date) // Get events (models) from the storage / API\n\n  var events = [Event]()\n\n  for model in models {\n      // Create new EventView\n      let event = Event()\n      // Specify DateInterval\n      event.dateInterval = DateInterval(start: model.startDate, end: model.endDate)\n      // Add info: event title, subtitle, location to the array of Strings\n      var info = [model.title, model.location]\n      info.append(\"\\(datePeriod.beginning!.format(with: \"HH:mm\")) - \\(datePeriod.end!.format(with: \"HH:mm\"))\")\n      // Set \"text\" value of event by formatting all the information needed for display\n      event.text = info.reduce(\"\", {$0 + $1 + \"\\n\"})\n      events.append(event)\n  }\n  return events\n}\n```\nAfter receiving an array of events for a particular day, CalendarKit will handle view layout and display.\n\n### Usage\nTo respond to the user input, override mehtods of `DayViewDelegate`, for example:\n\n```swift\noverride func dayViewDidSelectEventView(_ eventView: EventView) {\n  print(\"Event has been selected: \\(eventview.data)\")\n}\n\noverride func dayViewDidLongPressEventView(_ eventView: EventView) {\n  print(\"Event has been longPressed: \\(eventView.data)\")\n}\n```\n\n## Localization\nCalendarKit supports localization and uses iOS default locale to display month and day names. First day of the week is also selected according to the iOS locale.\n\n\u003cimg src=\"https://cloud.githubusercontent.com/assets/8013017/22315567/8ba5f9c2-e378-11e6-860d-b94e87a2a45c.PNG\" alt=\"German\" width=\"320\"\u003e\u003cimg src=\"https://cloud.githubusercontent.com/assets/8013017/22315600/c87e826a-e378-11e6-9280-732982b42077.PNG\" alt=\"Norwegian\" width=\"320\"\u003e\n\n\n## Styles\nBy default, CalendarKit looks similar to the Apple Calendar app and fully supports Dark Mode. If needed, CalendarKit's look can be easily customized. Steps to apply a custom style are as follows:\n\n1. Create a new `CalendarStyle` object (or copy existing one)\n2. Change style by updating the properties.\n3. Invoke `updateStyle` method with the new `CalendarStyle`.\n\n\n```Swift\nlet style = CalendarStyle()\nstyle.backgroundColor = UIColor.black\ndayView.updateStyle(style)\n```\n\u003cimg src=\"https://cloud.githubusercontent.com/assets/8013017/22717896/a2a6c6f2-edae-11e6-8ac3-d9add3d61fb9.png\" alt=\"Light theme\" width=\"320\"\u003e \u003cimg src=\"https://user-images.githubusercontent.com/8013017/69188457-3dfe6880-0b25-11ea-9674-39b9f3c1cd00.png\" alt=\"Dark theme\" width=\"320\"\u003e \n\n\n## Requirements\n\n- iOS 11.0+, macOS (Catalyst) 10.15+\n- Swift 5.7+\n\n## Contributing\nThe list of features currently in development can be viewed on the [issues](https://github.com/richardtop/CalendarKit/issues) page.\n\nBefore contributing, please review [guidelines and code style](https://github.com/richardtop/CalendarKit/blob/master/CONTRIBUTING.md).\n\n\n## Author\n\nRichard Topchii\n\n\n## License\n\n**CalendarKit** is available under the MIT license. See the LICENSE file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardtop%2Fcalendarkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichardtop%2Fcalendarkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardtop%2Fcalendarkit/lists"}