Coder Social home page Coder Social logo

uhouzz / pdtsimplecalendar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jivesoftware/pdtsimplecalendar

0.0 2.0 0.0 1.53 MB

A simple Calendar / Date Picker for iOS using UICollectionView

License: Apache License 2.0

Ruby 0.53% Objective-C 99.47%

pdtsimplecalendar's Introduction

PDTSimpleCalendar

Pod version Carthage compatible Build Status

PDTSimpleCalendar is a very simple calendar/date picker component for your iOS apps based on UICollectionView.

Default Scrolling Hebrew

###Upgrade Note

You should read the Release Notes when you upgrade to a newer version.

##Install

###Cocoapods

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

In your Cartfile simply add:

github "jivesoftware/PDTSimpleCalendar" ~> 0.9.1

run carthage update

Finally you need to add the built framework to your project. For more information about Carthage : github.com/Carthage/Carthage

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

###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

###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 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

[[PDTSimpleCalendarViewCell appearance] setCircleDefaultColor:[UIColor whiteColor]];
[[PDTSimpleCalendarViewCell appearance] setCircleSelectedColor:[UIColor orangeColor]];
[[PDTSimpleCalendarViewCell appearance] setCircleTodayColor:[UIColor blueColor]];
[[PDTSimpleCalendarViewCell appearance] setTextDefaultColor:[UIColor redColor]];
[[PDTSimpleCalendarViewCell appearance] setTextSelectedColor:[UIColor purpleColor]];
[[PDTSimpleCalendarViewCell appearance] setTextTodayColor:[UIColor magentaColor]];
[[PDTSimpleCalendarViewCell appearance] setTextDisabledColor:[UIColor yellowColor]];

[[PDTSimpleCalendarViewHeader appearance] setTextColor:[UIColor redColor]];
[[PDTSimpleCalendarViewHeader appearance] setSeparatorColor:[UIColor orangeColor]];

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

See the Demo for the full API and even more customization.

Here is how it looks in the Producteev app:

Producteev

##License

Copyright 2013-2015 Jive Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

pdtsimplecalendar's People

Contributors

jmig avatar iosboy avatar adonoho avatar archfear avatar lancep avatar teonivalois avatar yuwen-yan avatar ianhoar avatar hout avatar mikeabdullah avatar tewha avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.