Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tichise/popoverdatepicker
PopOverDatePicker is a PopOver style DatePicker view.
https://github.com/tichise/popoverdatepicker
cocoapods datepicker ios ipad iphone mac swift time uidatepicker watchos
Last synced: 2 months ago
JSON representation
PopOverDatePicker is a PopOver style DatePicker view.
- Host: GitHub
- URL: https://github.com/tichise/popoverdatepicker
- Owner: tichise
- License: mit
- Created: 2019-08-26T11:25:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-01T18:27:13.000Z (almost 2 years ago)
- Last Synced: 2024-04-24T08:29:34.928Z (9 months ago)
- Topics: cocoapods, datepicker, ios, ipad, iphone, mac, swift, time, uidatepicker, watchos
- Language: Swift
- Homepage:
- Size: 18.6 KB
- Stars: 22
- Watchers: 4
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
### PopOverDatePicker ![CocoaPods Version](https://img.shields.io/cocoapods/v/PopOverDatePicker.svg?style=flat) ![Platform](https://img.shields.io/cocoapods/p/PopOverDatePicker.svg?style=flat) ![License](https://img.shields.io/cocoapods/l/PopOverDatePicker.svg?style=flat)
PopOverDatePicker is a PopOver style DatePicker view.
### Image
#### iPhone
![image](https://user-images.githubusercontent.com/43707/63687725-4d308b80-c840-11e9-8e8b-4c6e07db38a6.png)### Examples
#### for Swift
```
let calendar = Calendar.current
let date = Date()
guard let yesterday = calendar.date(byAdding: .day, value: -1, to: calendar.startOfDay(for: date)) else {
fatalError()
}guard let tomorrow = calendar.date(byAdding: .day, value: +1, to: calendar.startOfDay(for: date)) else {
fatalError()
}let popOverDatePickerViewController = PopOverDatePickerViewController.instantiate()
popOverDatePickerViewController.set(date: date)
popOverDatePickerViewController.set(minimumDate: yesterday)
popOverDatePickerViewController.set(maximumDate: tomorrow)
popOverDatePickerViewController.set(datePickerMode: .date)
popOverDatePickerViewController.set(locale: Locale(identifier: "ja-JP"))
popOverDatePickerViewController.popoverPresentationController?.barButtonItem = sender
popOverDatePickerViewController.presentationController?.delegate = self
popOverDatePickerViewController.changeHandler = { (date: Date) -> Void in
print(date)
}
present(popOverDatePickerViewController, animated: true, completion: nil)
```### Installation (CocoaPods)
`pod PopOverDatePicker`### CocoaPods URL
- [PopOverDatePicker on CocoaPods.org](https://cocoapods.org/pods/PopOverDatePicker)### License
PopOverDatePicker is available under the MIT license. See the LICENSE file for more info.