Latest | 1.0.2 |
---|---|
Homepage | https://github.com/Dess-Li/PopupDatePicker |
License | MIT |
Platforms | ios 8.0 |
Frameworks | UIKit |
Authors |
PopupDatePicker
Installation
CocoaPods (What is that?)
- Add
pod 'PopupDatePicker'
to yourPodfile
; - Then run
pod update
in Terminal; - Re-open your project using
.xcworkspace
, putimport PopupDatePicker
in the swift files you plan; - Rebuild and enjoy.
Usage
Firstly, import PopupDatePicker
.
import PopupDatePicker
Initialization
let datePicker = PopupDatePicker.init(currentDate: nil, minLimitDate: Date(), maxLimitDate: nil, dpShowType: "yyyy-MM-dd", wildcardArray: nil, wildcardDefaults: nil) {_,_ in }
datePicker.show()
/// PopupDatePicker
///
/// - Parameters:
/// - currentDate: Current Date
/// - minLimitDate: min limit Date
/// - maxLimitDate: max limit Date
/// - dpShowType:
/*
- yyyy: year 1970
- MM: month 01
- dd: day 01
- HH: hours 0..23
- mm: minutes 0..59
- ss: seconds 0..59
- $: splitter of components for the picker view. yyyy$MM$dd
- -: splitter of Year month day. yyyy-MM-dd
- :: splitter of hour minute second. HH:mm:dd
- ?{key}?: wildcard, something like ?hourange? the hourange is key, if use this flag you need set wildcard array
*/
/// - wildcardArray: if use DPShowType ?? flag you need set this param. Set DPShowType like ?key?$?key1? then set wildcardArray ["key":[ "a", "b" ], "key1":[ "c", "d" ]]
/// - wildcardDefaults: wildcardDefaults ["key": "value"]
/// - callback: (Date, [String:String]) -> (), first param is selected Date, second params is wildcard selected data
Contact Author
Feel free to send pull requests or propose changes.
Email: [email protected]
License
PopupDatePicker is released under an MIT license. See the LICENSE file.
Latest podspec
{ "name": "PopupDatePicker", "version": "1.0.2", "summary": "iOS PopupDatePicker with Swift 5", "swift_versions": "5.0", "description": "iOS PopupDatePicker with Swift 5, Release 1.0.2", "homepage": "https://github.com/Dess-Li/PopupDatePicker", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { "DessLi": "[email protected]" }, "platforms": { "ios": "8.0" }, "source": { "git": "https://github.com/Dess-Li/PopupDatePicker.git", "tag": "1.0.2" }, "source_files": [ "PopupDatePicker", "PopupDatePicker/**/*.swift" ], "frameworks": "UIKit" }
Sun, 12 May 2019 10:06:04 +0000