Skip to content
iOS DatePicker + function πŸ‘
Swift Ruby
Branch: master
Clone or download
Latest commit 770099c Jul 9, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CalendarPicker FIX Bug Jul 9, 2019
Example
img 0.1.0 distribute πŸ‘ Jul 8, 2019
.gitignore Initial commit Jul 8, 2019
CalendarPicker.podspec FIX Bug Jul 9, 2019
LICENSE 0.1.0 distribute πŸ‘ Jul 8, 2019
README.md 0.1.0 distribute πŸ‘ Jul 8, 2019
_Pods.xcodeproj 0.1.0 distribute πŸ‘ Jul 8, 2019

README.md

CalendarPicker

Version License Platform Swift 5.0

Introduce

I have added some features in the iOS default DatePicker.

Preview

Requirements

CalendarPicker written in Swift 5.0. Compatible with iOS 8.0+

Installation

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

pod 'CalendarPicker'

Usage

import CalendarPicker
let calendarPicker = CalendarPicker()

Property

Locale

calendarPicker.localeType = .en
calendarPicker.localeType = .ko
calendarPicker.localeType = .jp
calendarPicker.localeType = .zh
calendarPicker.localeType = .default

Date

calendarPicker.date = Date()
print(calendarPicker.selectedDateComponent)

minimum & maximum

calendarPicker.minimumDate = Date()
calendarPicker.maximumDate = Date()

Show Week

calendarPicker.isShowWeek = true

Colors

calendarPicker.textColor = .black
calendarPicker.saturdayColor = .blue
calendarPicker.sundayColor = .red

Font

calendarPicker.font = UIFont.systemFont(ofSize: 23)

Function

calendarPicker.update(animated: true)
calendarPicker.setDate(Date(), animated: true)

Delegate

class ViewController: UIViewController{
    override func viewDidLoad() {
        super.viewDidLoad()

        let calendarPicker = CalendarPicker()
        calendarPicker.delegate = self
    }
}

// MARK: CalendarPickerDelegate
extension ViewController: CalendarPickerDelegate {
    func calendarPickerSelectDate(_ dateCompontnt: DateComponent) {

    }
}

Author

pikachu987, pikachu77769@gmail.com

License

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

You can’t perform that action at this time.