Skip to content
Simple and Clear Calendar
Branch: master
Clone or download
DevYeom update 1.1.0
- add calendar type (normal, limited)
- remove duplicated code
- change indentation style (tab -> space)
- update README
Latest commit a1ad633 Jul 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example update 1.1.0 Jul 22, 2019
ScreenShot update 1.1.0 Jul 22, 2019
YYCalendar update 1.1.0 Jul 22, 2019
.gitignore Initial commit Jun 20, 2019
LICENSE Initial Commit Jun 20, 2019
README.md update 1.1.0 Jul 22, 2019
YYCalendar.podspec update 1.1.0 Jul 22, 2019
_Pods.xcodeproj Initial Commit Jun 20, 2019

README.md

YYCalendar

Swift Version License Platform

Introduction

When you need to let users choose date from calendar. You can use YYCalendar. Simple And Clear 😎

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Demo

Usage

To create and show a calendar, first of all, import the module at the beginning of the file:

import YYCalendar

First of all, you can show the calendar as below:

you have to equate format of date parameter with format parameter.

let calendar = YYCalendar(langType: .ENG, date: "06/10/2019", format: "MM/dd/yyyy", disableAfterToday: false) { date in
    self.selectedDateLabel.text = date
}

calendar.show()

Calendar Type

There are two types of calendar.

calendarType description
normal you can select all of the date periods
limited you can limit selectable date periods
// normal type
init(langType type: LangType, date: String, format: String, disableAfterToday: Bool, completion selectHandler: SelectHandler?)

// limited type
init(langType type: LangType, date: String, minDate: String?, maxDate: String?, format: String, completion selectHandler: SelectHandler?)

normalType_Sample limitedType_Sample

Language Type

Week label can be changed by selecting langType

langType weekLabel
ENG SUN, MON, TUE, WED, THU, FRI, SAT
ENG2 Sun, Mon, Tue, Wed, Thu, Fri, Sat
ENG3 S, M, T, W, T, F, S
KOR 일, 월, 화, 수, 목, 금, 토
CHN 日, 月, 火, 水, 木, 金, 土

ENG_Sample ENG2_Sample ENG3_Sample KOR_Sample CHN_Sample

Installation

YYCalendar is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'YYCalendar'

Author

DevYeom, dev.yeom@gmail.com

License

YYCalendar is available under the MIT license. See the LICENSE file for more info.

You can’t perform that action at this time.