Skip to content
A simple custom iOS date picker for year/month/day selection
Objective-C Shell Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
ZHDatePicker.xcodeproj
ZHDatePicker
.gitignore
.travis.yml
LICENSE
README.md
ZHDatePicker.podspec
_Pods.xcodeproj
screen.png

README.md

ZHDatePicker

CI Status Version License Platform

A simple custom iOS date picker.

Alt text

Animation

Simply slide up from the bottom

Delegate

Whenever user select on year/month/day , will info delegate with all new value.

@protocol ZHDatePickerDelegate <NSObject>

@optional

- (void)didSelectDateWithDate:(NSDate *)date year:(NSInteger)year month:(NSInteger)month day:(NSInteger)day;
@end

Properties

@property(nonatomic, assign) NSInteger minYear;//default : 1960

@property(nonatomic, assign) NSInteger maxYear;//default : 100 + today's year

Display Mode:

typedef enum {
    ZHDatePickerDisplayModeFreeStyle = 0,
    ZHDatePickerDisplayModelBeforeCurrent = 1
} ZHDatePickerDisplayMode;
  • ZHDatePickerDisplayModeFreeStyle

Select date whatever you want from default setting (1960 - 100 years after current year)

  • ZHDatePickerDisplayModelBeforeCurrent

Set the maximun Date to today's date , and limit user's selection from 1960 - current year

TODO

  • Slide position
  • Time selection
  • Background and Text Color

Example

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

Requirements

Installation

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

pod "ZHDatePicker"

Author

zhhlmr, zhouhan199132@gmail.com

License

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

You can’t perform that action at this time.