PagingDatePicker 0.1.2

PagingDatePicker 0.1.2

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Apr 2016
SPMSupports SPM

Maintained by Lammert Westerhoff.



 
Depends on:
DynamicColor~> 2.4
RSDayFlow~> 1.4
SwiftDate~> 3.0
 

PagingDatePicker

This library consists of two components that can be used on it’s own or together. One is a swipeable month picker and the other is a paging calendar date picker showing one month on each page. The month picker can be used as navigation header for the calendar date picker.

Sample

Usage

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

Using the month picker

You can either create a new MonthPickerView from code or assign a view in your Storyboard with this type. After that you can assign its delegate to receive callbacks when a month has been selected.

Using the paging date picker

You can either create a new PagingDatePickerView from code or assign a view in your Storyboard with this type. After that you can assign its delegate to receive callbacks when it has swiped to another page (i.e. month).

Combining the month date picker and paging date picker

There are several ways to use the month picker and paging date picker together. All that needs to happen is that the change in month of one component is communicated to the other. You can do this manually or you can do this through one of the two provided ways:

  • Use the PagingDateAndMonthPickerView to have a default layout with the month picker above the date picker.
  • Create your own views in a Storyboard and connect them to the outlets of a PagingDateAndMonthPickerViewControl

See the Example project for sample usages.

Installation

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

pod "PagingDatePicker"

RSDayFlow

The PagingDatePicker is currently build on top of RSDayFlow and has been build in a similar style to customize it. You can set a datePickerViewDelegate and datePickerViewDataSource on the PagingDatePickerView which will be propagated to the underlying RSDFDatePickerView.

Author

Lammert Westerhoff, [email protected]

License

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