Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MattLLLLL/MDatePickerView
Quick and easy date picker.
https://github.com/MattLLLLL/MDatePickerView
cocopods date datepicker ios iphone picker pickerview swift
Last synced: 3 months ago
JSON representation
Quick and easy date picker.
- Host: GitHub
- URL: https://github.com/MattLLLLL/MDatePickerView
- Owner: MattLLLLL
- License: mit
- Created: 2020-01-13T04:05:05.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-28T15:06:12.000Z (almost 3 years ago)
- Last Synced: 2024-07-27T19:42:45.211Z (4 months ago)
- Topics: cocopods, date, datepicker, ios, iphone, picker, pickerview, swift
- Language: Swift
- Homepage:
- Size: 57.6 KB
- Stars: 470
- Watchers: 11
- Forks: 37
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## Requirements
- iOS 9.0
- Xcode 9
- Swift 4.0## Installation
You can install MDatePickerView in several ways:Add source files to your project.
- Use CocoaPods:```swift
pod 'MDatePickerView'
```## Usage
```swift
import MDatePickerView
```## Usage example
```swift
lazy var MDate : MDatePickerView = {
let mdate = MDatePickerView()
mdate.Color = .gray
mdate.delegate = self
mdate.from = 1980
mdate.to = 2100
return mdate
}()
```**Adopt the MDatePickerViewDelegate protocol in your view controller, e.g.**
```swift
extension ViewController : MDatePickerViewDelegate {
func mdatePickerView(selectDate: Date) {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy - MM - dd"
let date = formatter.string(from: selectDate)
Label.text = date
}
}
```## What's next
- Any suggestions?## Contribution
- If you found a bug, open an issue
- If you have a feature request, open an issue
- If you want to contribute, submit a pull request
- If you have any issue or want help, please drop me a mail on [email protected]## License
MDatePickerView is distributed under the MIT license. [See LICENSE](https://github.com/MattLLLLL/MDatePickerView/blob/master/LICENSE.md) for details.