Home

Awesome

crispycalendar

Whether you are writing yet another one task tracker or calendar app, or simply want to offer the users to skip the joy of using UIDatePicker and let them quickly and efficiently select dates — CrispyCalendar is the calendar UI framework you need.

CocoaPods Compatible Platform support Documentation License

Features

Getting Started

Installation

Cocoapods (preferred)

CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. It has over 53 thousand libraries and is used in over 3 million apps. More details and installation instructions may be found here: Using Cocoapods.

To integrate CrispyCalendar into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.3'

target 'TargetName' do
    pod 'CrispyCalendar', '~> 1.0.2'
end

Then, run the following command:

$ pod install

Manual

Open Demo project in Xcode and build CrispyCalendar framework target. Then, embed it into your project and add it to Linked Frameworks and Libraries section of app target.

Screenshots

Appearance customization

All the fonts, colors and other appearance details are customizable via corresponding properties. CPCCalendarView does also support customization via UIAppearance for properties representable in Objective C.

<table> <tr><th>Default</th><th>Basic from Debt Control</th><th>Input view from Debt Control</th></tr> <tr><td> <img src="https://user-images.githubusercontent.com/2410233/47380929-5116ed00-d707-11e8-8395-c8fdf3ef4740.png" alt="default" width="375" /> </td><td> <img src="https://user-images.githubusercontent.com/2410233/47381603-18781300-d709-11e8-9346-44f92c7aca13.png" alt="basic" width="375" /> </td><td> <img src="https://user-images.githubusercontent.com/2410233/47381605-18781300-d709-11e8-9208-1479228e4c70.png" alt="inputview" width="375" /> </td></tr></table>

Simple selection

Prebuilt UI commonly uses CPCMonthView capable of displaying single month. CPCMultiMonthsView may be used as container for month views allowing shared selection handling and other functionality.

<table> <tr><th>Single day selection</th><th>Days range selection</th></tr> <tr><td> <img src="https://user-images.githubusercontent.com/2410233/47583322-be24bf80-d95f-11e8-8f80-5716294e53b3.gif" alt="single" width="375" /> </td><td> <img src="https://user-images.githubusercontent.com/2410233/47583320-be24bf80-d95f-11e8-93ed-85c08f1f9248.gif" alt="range" width="375" /> </td></tr></table>

Ordered & unordered selection

Selection process is fully controlled externally by corresponding view's delegate. Note that delegates for views inside containers are not supported.

<table> <tr><th>Unordered selection</th><th>Ordered selection</th></tr> <tr><td> <img src="https://user-images.githubusercontent.com/2410233/47583318-bd8c2900-d95f-11e8-9b2b-910eb06f4184.gif" alt="unordered" width="375" /> </td><td> <img src="https://user-images.githubusercontent.com/2410233/47583317-bd8c2900-d95f-11e8-9e64-8ac47766a96d.gif" alt="ordered" width="375" /> </td></tr></table>

Custom draw handlers

CPCMonthView does not comprise any real child views but is logically drawn from title "label" and "grid", consisting of "day cells". Custom day rendering is supported via custom CPCDayCellRenderers.

<table> <tr><th>Custom cell renderer example</th></tr> </td><td> <img src="https://user-images.githubusercontent.com/2410233/47583315-bd8c2900-d95f-11e8-847e-d394551f906c.gif" alt="drawing" width="375" /> </td></tr></table>

Localization

Locale used by any component cannot be set explicitly, but Calendar's locale is honored. The framework uses [[[NSBundle mainBundle] preferredLocalizations] firstObject] as default locale, including setting it for calendars without explicitly set locale.

<table> <tr><th>Non-gregorian calendar rendering</th></tr> </td><td> <img src="https://user-images.githubusercontent.com/2410233/47583313-bd8c2900-d95f-11e8-884b-6ec1da3c27b8.gif" alt="hebrew" width="375" /> </td></tr></table>

Other

Available dates limiting, RTL and landscape orientation are fully supported.

<table> <tr><th>Dates limiting</th><th>Columned mode</th></tr> <tr><td> <img src="https://user-images.githubusercontent.com/2410233/47583312-bd8c2900-d95f-11e8-88b7-ab6d293c7e9b.gif" alt="constrained" width="375" /> </td><td> <img src="https://user-images.githubusercontent.com/2410233/47583311-bd8c2900-d95f-11e8-9f00-7ed865e135d9.gif" alt="columns" width="375" /> </td></tr></table> <table> <tr><th>RTL layout</th></tr> <tr><td> <img src="https://user-images.githubusercontent.com/2410233/47584227-5328b800-d962-11e8-86cb-708befe84246.gif" alt="rtl" width="812" /> </td></tr></table>

Credits

CrispyCalendar is owned and maintained by the Cleverpumpkin, Ltd.

CrispyCalendar was originally created by Kirill Bystrov as a response to lack of quality calendar-rendering libraries. Android couterpart does exist (but neither API nor UX is similar), check it out here: CrunchyCalendar.

License

CrispyCalendar is released under the MIT license. See LICENSE for details.