You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calendar component with both RTL/LTR languages support with Swipe Gesture enabled navigation.
Easy to use with Storyboard and Attributes Inspector support.
Requirements
Xcode 10+
Swift 4+
iOS 8+
Installation
Cocoapods
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
pod 'GDCalendar'
end
pod update
pod install
Usage
import GDCalendar
Set To Desire Locale Calendar
// Persian Calendar Locale: fa_IR
UserDefaults.standard.set("fa_IR", forKey:"current_locale")
// List of available iOS locale names
// https://gist.github.com/jacobbubu/1836273
/*
If `current_locale` is not set, default phone calendar will be selected
*/
// Days view items color
calendar.headerItemColor =UIColor.white
// Main calendar items text color
calendar.itemsColor =UIColor.black
// Header view items font
calendar.headersFont =UIFont.boldSystemFont(ofSize:13)
// Calendar items font
calendar.itemsFont =UIFont.systemFont(ofSize:15)
// Full properties list can be found on sample project
Set Date Selection Closure
calendar.dateSelectHandler ={[weak self] selectedDate inprint(selectedDate)
// Get Date Components
letday= date.dayName
letmonth= date.monthName
letcomponents= date.componentsOfDate
print("\(components.year) / \(components.month) / \(components.day)")}
Storyboard
Add UIView to storyboard, set custom class to GDCalendar
Set attributes with Attribute Inspector
Licence
GDCalendar is available under the MIT license. See the LICENSE.txt file for more info.
About
Calendar component with RTL languages written in swift