/TLMonthYearPicker

A simple month and year picker for iOS.

Primary LanguageSwiftMIT LicenseMIT

TLMonthYearPicker

A simple month and year picker for iOS app development. Now support Swift 4.2
Android version can be found here.

TLMonthYearPicker

How it works

    self.monthYearPicker.calendar = calendar
    self.monthYearPicker.monthYearPickerMode = .monthAndYear // or '.year'
    self.monthYearPicker.minimumDate = self.minimumDate
    self.monthYearPicker.maximumDate = self.maximumDate
    self.monthYearPicker.delegate = self

    //Picker delegate
    func monthYearPickerView(picker: TLMonthYearPickerView, didSelectDate date: Date) {
        //do your work with selected date object
    }

Add to your project

There are 2 ways you can add TLMonthYearPickerView to your project:

Manual installation

Simply drag 'TLMonthYearPickerView.swift' into your project.

Installation with CocoaPods

    pod 'TLMonthYearPicker'

For Swift 4.0, please use version 2.0.0:

    pod 'TLMonthYearPicker', '2.0.0'

For Swift 3.x, please use version 1.0.3:

    pod 'TLMonthYearPicker', '1.0.3'

License

Usage is provided under the MIT License. See LICENSE for the full details.