Calendar component with RTL languages written in swift

Overview

GDCalendar

Calendar component with both RTL/LTR languages support with Swipe Gesture enabled navigation.
Easy to use with Storyboard and Attributes Inspector support.

screen shot 2017-04-13 at 01 42 00

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
*/

Code

let calendar = GDTextSlot(frame: view.bounds)
view.addSubview(calendar)

Set Properties

// 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 in
    print(selectedDate)

    // Get Date Components
    let day = date.dayName
    let month = date.monthName
    
    let components = date.componentsOfDate
    print("\(components.year) / \(components.month) / \(components.day)")
}

Storyboard

  1. Add UIView to storyboard, set custom class to GDCalendar
  2. Set attributes with Attribute Inspector

Licence

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

You might also like...
An Easy to Use Calendar for iOS (Swift 5.0)
An Easy to Use Calendar for iOS (Swift 5.0)

This is an easy to use, "just drag and drop it in your code" type of calendar for iOS. It supports both vertical and horizontal scrolling, as well as

A fully customizable iOS calendar library, compatible with Objective-C and Swift
A fully customizable iOS calendar library, compatible with Objective-C and Swift

Table of contents Screenshots Installation Pre-knowledge Support Contact Screenshots iPhone iPad Safe Orientation Today Extension iOS8/9 iOS10 Interac

The elegant full screen calendar missed in SwiftUI.
The elegant full screen calendar missed in SwiftUI.

ElegantCalendar ElegantCalendar is an efficient and customizable full screen calendar written in SwiftUI. ElegantTimeline - Shows what's possible usin

SwiftUI Simple Calendar / Date Picker for iOS
SwiftUI Simple Calendar / Date Picker for iOS

RKCalendar RKCalendar is a SwiftUI Calendar / Date Picker for iOS. Features include: minimum and maximum calendar dates selectable, single date select

A customizable swiftui calendar
A customizable swiftui calendar

Description not available. Installation From Xcode 11, you can use Swift Package Manager to add Kingfisher to your project. Select File Swift Packag

An easy to use SwiftUI date picker for Shamsi (Persian) calendar
An easy to use SwiftUI date picker for Shamsi (Persian) calendar

ShamsiDatePicker An easy-to-use SwiftUI iOS/watchOS date picker for Shamsi (Persian) calendar. Features Pure (100%) SwiftUI implementation Full suppor

SwiftUICalendar - SwiftUI simple calendar
SwiftUICalendar - SwiftUI simple calendar

SwiftUICalendar Installation CocoaPods pod 'SwiftUICalendar' import import SwiftUICalendar Features Infinite scroll Support horizontal and vertical sc

Dead simple calendar implementation
Dead simple calendar implementation

Package provides a CalendarView which can be used to display simple calendar in your App.

A calendar quick view for the MacOS status bar

Calendar Quick View Quick Menu Calendar in the mac app store An open source macOS calendar preview utility Download from the Mac App Store Visualizati

Comments
  • پیشنهاد توسعه

    پیشنهاد توسعه

    سلام پیشنهادی دارم برای افزودن قابلیت نمایش رویداد به برنامه ای که توسعه دادید

    الان که همه ی سیستم ها به اینترنت متصل هستند پیشنهاد میکنم ارتباط با ای پی آي های تقویم رو هم در این سورس خوب پیاده سازی کنید خودم از این سرویس زیاد استفاده میکنم

    وب سرویس تقویم فارسی

    اطلاعات خوبی ارائه میده مثل وقایع و مناسبت های هر روز و دریافت رویداد در حالت شمسی و قمری و میلادی
    opened by mehrdadashtari 1
  • view crashing

    view crashing

    hi. have you test it in segue mode ?

    it is working in a single ViewController but when you come from another controller the calender view(UIView) crash s out

    opened by M0TRIX 0
Owner
Saeid
iOS Developer
Saeid
RCalendarPicker A date picker control, Calendar calendar control, select control, calendar, date selection, the clock selection control.

RCalendarPicker RCalendarPicker Calendar calendar control, select control, calendar, date selection, the clock selection control. 日历控件 ,日历选择控件,日历,日期选择

杜耀辉 131 Jul 18, 2022
Simple customizable calendar component in Swift :calendar:

Koyomi Koyomi is a simple calendar view framework for iOS, written in Swift ?? Content Features Demo App Usage introduction : Change displayed month,

Shohei Yokoyama 741 Dec 24, 2022
A declarative, performant, iOS calendar UI component that supports use cases ranging from simple date pickers all the way up to fully-featured calendar apps.

HorizonCalendar A declarative, performant, calendar UI component that supports use cases ranging from simple date pickers all the way up to fully-feat

Airbnb 2.2k Jan 4, 2023
Malendar is a personal calendar app that connects to your default calendar and lets you add/delete events

Malendar is a personal calendar app that connects to your default calendar and lets you add/delete events. It will gather events from your default iOS calendar.

Chase 194 Jan 4, 2023
A Swift UI component for Lunar Calendar Picker

LunarYearDatePicker a Swift UI component for Lunar Calendar Picker Usage: struct

null 6 Nov 22, 2022
A custom visual calendar for iOS 8+ written in Swift (>= 4.0).

Overview Screenshots GIF Demo Installation Usage Architecture Version matrix Advanced API For contributors Screenshots GIF Demo Installation CocoaPods

null 3.5k Dec 24, 2022
A calendar control for iOS written in swift with mvvm pattern

ASCalendar try it on appetize Installation CocoaPods You can use CocoaPods to install ASCalendar by adding it to your Podfile: platform :ios, '8.0' us

Alberto Scampini 192 Jun 26, 2022
Clendar - universal calendar app. Written in SwiftUI. Available on App Store. MIT License.

Clendar - minimal calendar Minimal Calendar & Widgets Landing Page About This project is started out as an UIKit base app for me to learn new WWDC fea

Vinh Nguyen 418 Dec 30, 2022
CalendarApp Swift - Made a calendar app in swift, completely from scratch using UIStackView and UICollectionView

CalendarApp_Swift Made a calendar app in swift, completely from scratch using UI

Arnav Chhokra 1 Feb 4, 2022
📅 Calendar for iOS, iPadOS and macOS in Swift

CalendarKit CalendarKit is a Swift calendar UI library for iOS, iPadOS and Mac Catalyst. It looks similar to the Apple Calendar app out-of-the-box, wh

Richard Topchii 2.2k Jan 5, 2023