Home

Awesome

SSCalendarControl

SSCalendarControl is small and highly customizable calendar control written in swift.

Swift Version Build Status License Platform PRs Welcome

Alt text

Features!

Requirements

Installation

Manually

Usage example

Setup Calendar

calendarView.setUpCalendar(startDate: startDate, endDate: endDate, weekStartDay: .monday, shouldSelectPastDays: true, sholudAllowMultipleSelection: false)

Weekday Customization

calendarView.configuration.weekDayBorderColor = UIColor.black
calendarView.configuration.weekDayLabelBackgroundColor = UIColor.clear
calendarView.configuration.weekDayLabelTextColor = UIColor.black

Month Customization

calendarView.configuration.monthViewBackgroundColor = UIColor.white
calendarView.configuration.monthViewBottomLineColor = UIColor.darkGray
calendarView.configuration.monthLabelFont = UIFont.systemFont(ofSize: 20)
calendarView.configuration.monthLabelTextColor = UIColor.red

Days Customization

calendarView.configuration.previousDayTextColor = UIColor.black
calendarView.configuration.previousDayBorderColor = UIColor.clear
calendarView.configuration.upcomingDaysBorderColor = UIColor.clear
calendarView.configuration.upcomingDaysBorderColor = UIColor.clear
calendarView.configuration.upcomingDayTextColor = UIColor.brown
calendarView.configuration.selectedDayTextColor = UIColor.yellow
calendarView.configuration.currentDayBorderColor = UIColor.black
calendarView.configuration.currentDayTextColor = UIColor.white
calendarView.configuration.currentDayBackgroundColor = UIColor.red

Selection Delegates

calendarView.delegate = self

extension ViewController: SSCalendarDeleagte {

    func dateSelected(_ date: Date) {
        print("selected: \(date)")
    }

    func dateDeSelected(_ date: Date) {
        print("deSelected: \(date)")
    }
}

Contribute

Meta