Skip to content

Latest commit

 

History

History
executable file
·
89 lines (73 loc) · 3.59 KB

README.md

File metadata and controls

executable file
·
89 lines (73 loc) · 3.59 KB

License Platform Build Status

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:
pod 'MDatePickerView'

Usage

import MDatePickerView

Usage example

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.

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

The MIT License (MIT)

Copyright © 2020 MattLLLLL

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.