Skip to content

mohammed1955/CollapsibleDatePicker

Repository files navigation

CollapsibleDatePicker

License


Features

  1. You can use it with storyboard and Programmatically
  2. Easy to customize and interact

Requirements

  • iOS 11.0+
  • Xcode 9+

Swift Package Manager

CollapsibleDatePicker is available through Swift Package Manager. To install it, simply go to Xcode under File > Swift Packages > Add Package Dependency...

Manually

If you prefer not to use SPM, you can integrate CollapsibleDatePicker into your project manually.

Usage

Storyboard

You can use CollapsibleDatePicker from storyboard easily By changing the type of a regular UIView into CollapsibleDatePickerView and set its Moudle to be CollapsibleDatePicker.

Programmatically

let collapseView = CollapsibleDatePickerView()
collapseView.dateType = .dateAndTime
collapseView.doneButtonBackgroundColor = #colorLiteral(red: 0, green: 0.4784313725, blue: 1, alpha: 1)

// get the selected date like this:
collapseView.selectedDate = {(date) in
    print(date)
}

// CollapsibleDatePickerView by default is invisible so you can show it like this(considering you have already set an action for a button):

@IBAction func showCollapsibleDatePickerView(_ sender: UIButton) {
    collapseView.show()
}

Author

Mohammed Reza Ghate

License

CollapsibleDatePicker is available under the MIT license. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages