D2PDatePicker alternatives and similar libraries
Based on the "PickerView" category.
Alternatively, view D2PDatePicker alternatives based on common mentions on social networks and blogs.
-
SKCountryPicker
A simple, customizable Country picker for picking country or dialing code. ๐ฎ๐ณ ๐ฏ๐ต ๐ฐ๐ท ๐ฉ๐ช ๐จ๐ณ ๐บ๐ธ ๐ซ๐ท ๐ช๐ธ ๐ฎ๐น ๐ท๐บ ๐ฌ๐ง -
McPicker
McPicker is a customizable, closure driven UIPickerView drop-in solution with animations that is rotation ready. -
AIDatePickerController
DISCONTINUED. ๐ UIDatePicker modally presented with iOS 7 custom transitions.
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of D2PDatePicker or a related project?
README
D2PDatePicker
ย ย
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Example Code: Programmatical Initialization
import D2PDatePicker
class ViewController: UIViewController {
var datePickerView: D2PDatePicker!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
ย ย ย ย // Init DatePickerView
ย ย ย datePickerView = D2PDatePicker(frame: .zero, date: Date())
datePickerView.translatesAutoresizingMaskIntoConstraints = false
// Set the Delegate
datePickerView.delegate = self
self.view.addSubview(datePickerView)
self.view.addConstraints([
NSLayoutConstraint(item: datePickerView, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: 250),
NSLayoutConstraint(item: datePickerView, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: 200),
NSLayoutConstraint(item: datePickerView, attribute: .centerX, relatedBy: .equal, toItem: self.view, attribute: .centerX, multiplier: 1, constant: 0),
NSLayoutConstraint(item: datePickerView, attribute: .centerY, relatedBy: .equal, toItem: self.view, attribute: .centerY, multiplier: 1, constant: 0)])
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
extension ViewController: D2PDatePickerDelegate {
func didChange(toDate date: Date) {
print(date)
}
}
Documentation
All of the methods and properties available for D2PDatePicker are documented below.
Changing the Main Color
The mainColor
Property
Use the mainColor property of D2PDatePicker
to change the color.
Example usage:
self.datePickerView.mainColor = .red
Delegate
D2PDatePicker uses a delegate to receive date change events. The delegate object must conform to the D2PDatePickerDelete
protocol, which is composed of the method:
didChange(toDate date: Date)
Tells the delegate that the selected the date get updated.
Requirements
No Requirements
Installation
D2PDatePicker is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'D2PDatePicker'
Author
Credits
Credit to http://felicegattuso.com/projects/datedropper/ for the inspiration
License
D2PDatePicker is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the D2PDatePicker README section above
are relevant to that project's source code only.