Giter VIP home page Giter VIP logo

horizontalcalendar's Introduction

HorizontalCalendar

Horizontal week view calendar for iOS just like apple calendar

Swift 5 Version License Platform Country

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Demo

Horizontal Calendar is a great way to show schedules for mobile apps. Mobile screens are small and minimalistic and these kind of modern designs are necessary. This calendar is endlessly swipeable keeping the performance intact. User can select any date with ease of going back to today with a single click. Collapse view for this calendar is also very useful to save space which can be done by single tap on date or arrow.



Usage

Step 1: Create Calendar ๐Ÿš€

  // Create horizontal calendar
  let calendar = HorizontalCalendar()

Step 2: To get callbacks for changing date, register to the callback and you will be notified on every date changed. ๐Ÿคฏ

  // Add paginated delegates only 
  calendar.onSelectionChanged = { date in
      print(date)
  }

Step 3: You can change the color and apply your custom theme to the HorizonalCalendar. You can also change the date format. ๐Ÿฅฐ

  HorizontalCalendar.dateFormat = "EEEE, MMM d"
  HorizontalCalendar.selectedColor = .red
  HorizontalCalendar.todayColor = .teal
  HorizontalCalendar.textDark = .black
  HorizontalCalendar.textLight = .gray
  HorizontalCalendar.dateColor = .black

Step 4: No step 4, you're done ๐Ÿ˜Ž Enjoy horizontal calendar and provide your user with great user experience.

Step 5: Enjoy
Yeah! Thats all. You now have weekly calendar view with infinite scroll โค๏ธ
Simple, isnt it?

Installation

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

pod 'HorizontalCalendar'

Author

Salmaan Ahmed, [email protected]

License

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

horizontalcalendar's People

Contributors

salmaanahmed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

horizontalcalendar's Issues

prevent default selection on scrolling

by default today day selected which is perfect.
but if I scroll, next week date automatically set. How can I prevent this?
I need only today date selected until I press any date for selection.

Thanks

can not use this view

i use swift 5, min ios: 13
i try install pod this library. when in run app i get a error

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
HorizontalCalendar/HorizontalCalendar.swift:140: Fatal error: init(coder:) has not been implemented

I just installed it but haven't used it yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.