All Projects → JoeCiou → Jkcalendar

JoeCiou / Jkcalendar

Licence: mit
Calendar library for iOS

Programming Languages

swift
15916 projects
swift4
162 projects
swift3
66 projects

Projects that are alternatives of or similar to Jkcalendar

Period
PHP's time range API
Stars: ✭ 616 (+642.17%)
Mutual labels:  date, calendar
Table calendar
Highly customizable, feature-packed Flutter Calendar with gestures, animations and multiple formats
Stars: ✭ 897 (+980.72%)
Mutual labels:  date, calendar
Vue Ctk Date Time Picker
VueJS component to select dates & time, including a range mode
Stars: ✭ 707 (+751.81%)
Mutual labels:  date, calendar
React Infinite Calendar
✨ Infinite scrolling date-picker built with React, with localization, range selection, themes, keyboard support, and more.
Stars: ✭ 3,828 (+4512.05%)
Mutual labels:  date, calendar
Pickadate.js
The mobile-friendly, responsive, and lightweight jQuery date & time input picker.
Stars: ✭ 7,753 (+9240.96%)
Mutual labels:  date, calendar
Calendarview
An Easy to Use Calendar for iOS (Swift 5.0)
Stars: ✭ 429 (+416.87%)
Mutual labels:  date, calendar
Moment.php
Parse, validate, manipulate, and display dates in PHP w/ i18n support. Inspired by moment.js
Stars: ✭ 900 (+984.34%)
Mutual labels:  date, calendar
React Datetime Picker
A datetime picker for your React app.
Stars: ✭ 294 (+254.22%)
Mutual labels:  date, calendar
Period
Complex period comparisons
Stars: ✭ 1,001 (+1106.02%)
Mutual labels:  date, calendar
Mnth
📆 Calendar month as 2d array of Dates
Stars: ✭ 41 (-50.6%)
Mutual labels:  date, calendar
Zebra datepicker
A super-lightweight, highly configurable, cross-browser date / time picker jQuery plugin
Stars: ✭ 367 (+342.17%)
Mutual labels:  date, calendar
Dategrid
A customizable swiftui calendar
Stars: ✭ 71 (-14.46%)
Mutual labels:  date, calendar
Pandas market calendars
Exchange calendars to use with pandas for trading applications
Stars: ✭ 319 (+284.34%)
Mutual labels:  date, calendar
Angular Moment Picker
Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
Stars: ✭ 536 (+545.78%)
Mutual labels:  date, calendar
Timestamp
⏰ A better macOS menu bar clock.
Stars: ✭ 296 (+256.63%)
Mutual labels:  date, calendar
React Date Picker
A date picker for your React app.
Stars: ✭ 715 (+761.45%)
Mutual labels:  date, calendar
Md Date Time Picker
An implementation of Material Design Picker components in vanilla CSS, JS, and HTML
Stars: ✭ 272 (+227.71%)
Mutual labels:  date, calendar
React Native Calendar Select
A component to select period from calendar like Airbnb
Stars: ✭ 279 (+236.14%)
Mutual labels:  date, calendar
Rsdayflow
iOS 7+ Calendar (Date Picker) with Infinite Scrolling.
Stars: ✭ 843 (+915.66%)
Mutual labels:  date, calendar
Laydate
layDate(日期与时间组件) 是 layui 独立维护的三大组件之一
Stars: ✭ 1,066 (+1184.34%)
Mutual labels:  date, calendar

JKCalendar

Carthage compatible Version Platform Swift 3.x Swift 4.0

Screenshot

Requirements

  • iOS 9.0+
  • Xcode 8+

Installation

CocoaPods

To install add the following line to your Podfile:

pod 'JKCalendar'

Carthage

To install add the following line to your Cartfile:

github "JoeCiou/JKCalendar"

Usage

Firstley, import JKCalendar

import JKCalendar

Initialization

Then, there are to two ways you can create JKCalendar:

  • By storyboard, change class of any UIView to JKCalendar

Note: Set Module to JKCalendar.

  • By code, using initializer.
let calendar = JKCalendar(frame: frame)

Mark

public enum JKCalendarMarkType{
    case circle
    case hollowCircle
    case underline
    case dot
}

For single mark: For continuous mark:

Examples

Firstley, Setup data source:

calendar.dataSource = self

For single mark:

func calendar(_ calendar: JKCalendar, marksWith month: JKMonth) -> [JKCalendarMark]? {
    let today = JKDay(date: Date())
    if today == month{
        return [JKCalendarMark(type: .underline, day: today, color: UIColor.red)]
    }else{
        return nil
    }
}

For continuous mark:

func calendar(_ calendar: JKCalendar, continuousMarksWith month: JKMonth) -> [JKCalendarContinuousMark]?{
    let markStartDay = JKDay(year: 2017, month: 9, day: 3)!
    let markEndDay = JKDay(year: 2017, month: 9, day: 12)!
    if markStartDay == month || markEndDay == month{
        return [JKCalendarContinuousMark(type: .circle, start: markStartDay, end: markEndDay, color: UIColor.red)]
    }else{
        return nil
    }
}

License

The MIT License (MIT)

copyright (c) 2017 Joe Ciou

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].