Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the README.md #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 30 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
PDTSimpleCalendar
# PDTSimpleCalendar
=================

[![Pod version](https://img.shields.io/cocoapods/v/PDTSimpleCalendar.svg?style=flat)](http://cocoadocs.org/docsets/PDTSimpleCalendar)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Build Status](https://img.shields.io/travis/jivesoftware/PDTSimpleCalendar.svg?style=flat)](https://travis-ci.org/jivesoftware/PDTSimpleCalendar)

PDTSimpleCalendar is a very simple calendar/date picker component for your iOS apps based on UICollectionView.
PDTSimpleCalendar is a very simple calendar/date picker component for your iOS apps based on UICollectionView and a flowLayout. The application was inspired by the Square's TImeSquare and Apple Calendar. This application serves to be used within other iOS applications and supports multiple features to accommodate the users.

![Default](https://github.com/jivesoftware/PDTSimpleCalendar/raw/master/Documentation/default.png)
![Scrolling](https://github.com/jivesoftware/PDTSimpleCalendar/raw/master/Documentation/scrolling.png)
![Hebrew](https://github.com/jivesoftware/PDTSimpleCalendar/raw/master/Documentation/hebrew.png)

###Upgrade Note
## Upgrade Note

You should read the [Release Notes](https://github.com/jivesoftware/PDTSimpleCalendar/blob/master/RELEASENOTES.md) when you upgrade to a newer version.

##Install
## Installation

###Cocoapods
### Cocoapods

in your `Podfile` just add:
In your `Podfile` just add:

`pod 'PDTSimpleCalendar', '~> 0.9.1'`

then run `pod install`

And finally in your project import `#import <PDTSimpleCalendar/PDTSimpleCalendar.h>`

###Carthage
### Carthage

In your `Cartfile` simply add:

Expand All @@ -39,21 +39,21 @@ Finally you need to add the built framework to your project. For more informatio

**Warning**: Carthage uses dynamic framework and will only work if your app targets iOS 8.0 or later.

###Old-School
### Old-School
If you don't like cocoapods or Carthage or Cocoapods-Rome, you can still import it using `git submodule` or simply copy/paste all the source files in `PDTSimpleCalendar` to your project.


##Customize it
## Features

###Calendar
### Calendar
* `firstDate` : When the calendar must starts. If you don't specify anything, it will default to the first day of the current month (based on `[NSDate date]`). If `firstDate` is not the 1st of the month, the calendar will display the full month, but dates < `firstDate` will be disabled.
* `lastDate` : When the calendar must ends. If you don't specify anything, it will default to the last day of the next year (based on `firstDate`). If `lastDate` is not the last day of the month, the calendar will display the full month, but dates > `lastDate` will be disabled.
* `calendar` : Which calendar to use for display and date calculations. You can set any calendar supported by `NSCalendar`. the default value will be `[NSCalendar currentCalendar]`.
* `weekdayHeaderEnabled`: If enabled, add an extra header on top of the calendar with the days of the week. Default is NO.
* `weekdayTextType`: If weekday header is enabled, you can customize the format of the label. (Short (3 letters), VeryShort (1 letter), StandAlone (Full name of the day))


###Colors
### Colors
You can change the display of the calendar using `backgroundColor` & `overlayTextColor` properties on `PDTSimpleCalendarViewController`.

Other colors can be set using UIAppearance on `PDTSimpleCalendarViewCell`, `PDTSimpleCalendarViewHeader` & `PDTSimpleCalendarViewWeekdayHeader`
Expand All @@ -71,15 +71,31 @@ Other colors can be set using UIAppearance on `PDTSimpleCalendarViewCell`, `PDTS

[[PDTSimpleCalendarViewWeekdayHeader appearance] setHeaderBackgroundColor:[UIColor lightGrayColor]];
[[PDTSimpleCalendarViewWeekdayHeader appearance] setTextColor:[UIColor orangeColor]];


## Demo
*See the Demo for the full API and even more customization.*
https://github.com/jivesoftware/PDTSimpleCalendar/tree/master/PDTSimpleCalendarDemo

Here is how it looks in the Producteev app:
A demo is included in the application to see how the calendar will appear based on the default selected options that the user can edit to determine a visual look they desire. An example of how the calendar application will look in an iOS application can be seen on the Producteev app:

![Producteev](https://github.com/jivesoftware/PDTSimpleCalendar/raw/master/Documentation/producteev.png)

## Testing
*See the Tests file for the full testing code.*
https://github.com/jivesoftware/PDTSimpleCalendar/blob/master/PDTSimpleCalendarTests/PDTSimpleCalendarTests.m

The application has undergone the testings for the necessities of a basic calendar:
- [x] Ensuring that the calendar is properly set up upon call and contains the correct data.
- [x] Ensuring that the calendar is dismissed when clicked out of.
- [x] The default behavior of the calendar should make sure the first day of the month is a one along with the first and last days.
- [x] The first day of the month should be set to the correct day according to the year.
- [x] The last day of the month should be set to the correct day according to the year.
- [x] The number of days a week should be the correct amount based on the type of calendar that the user selects.

## Contribution
If you find a bug or have any issues with the application please open an issue here: https://github.com/jivesoftware/PDTSimpleCalendar/issues.

##License
## License

```
Copyright 2013-2015 Jive Software, Inc.
Expand Down