{"id":17851594,"url":"https://github.com/squimer/datepickerdialog-ios-swift","last_synced_at":"2025-05-16T06:02:13.877Z","repository":{"id":23597410,"uuid":"26966169","full_name":"squimer/DatePickerDialog-iOS-Swift","owner":"squimer","description":"Date picker dialog for iOS","archived":false,"fork":false,"pushed_at":"2023-11-29T14:21:21.000Z","size":297,"stargazers_count":584,"open_issues_count":41,"forks_count":177,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-10-29T22:32:52.251Z","etag":null,"topics":["date","hacktoberfest","ios","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/squimer.png","metadata":{"files":{"readme":"README.mdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-11-21T15:49:40.000Z","updated_at":"2024-10-19T00:07:05.000Z","dependencies_parsed_at":"2023-11-29T15:43:28.462Z","dependency_job_id":null,"html_url":"https://github.com/squimer/DatePickerDialog-iOS-Swift","commit_stats":{"total_commits":79,"total_committers":23,"mean_commits":"3.4347826086956523","dds":0.7215189873417722,"last_synced_commit":"ebe878e2c7e0b2a0d98a31d87814b6861296777f"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squimer%2FDatePickerDialog-iOS-Swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squimer%2FDatePickerDialog-iOS-Swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squimer%2FDatePickerDialog-iOS-Swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squimer%2FDatePickerDialog-iOS-Swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/squimer","download_url":"https://codeload.github.com/squimer/DatePickerDialog-iOS-Swift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247867362,"owners_count":21009240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["date","hacktoberfest","ios","swift"],"created_at":"2024-10-27T23:03:20.462Z","updated_at":"2025-04-08T15:12:48.609Z","avatar_url":"https://github.com/squimer.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DatePickerDialog 4.0 - iOS - Swift\n\nDatePickerDialog is an iOS drop-in classe that displays an UIDatePicker within an UIAlertView.\n\n[![](https://raw.githubusercontent.com/squimer/DatePickerDialog-iOS-Swift/master/images/screen1.png)](https://github.com/squimer/DatePickerDialog-iOS-Swift/tree/master/images)\n\n## Requirements\n\nDatePickerDialog works on iOS 7, 8 and 9, 10, 11, 12, 13 and 14. It depends on the following Apple frameworks, which should already be included with most Xcode templates:\n\n* Foundation\n* UIKit\n\n#### Swift Versions\n- Swift 5.3 (Current)\n- Swift 4.2 (```3.0``` tag)\n- Swift 4.2 (```2.1``` tag)\n- Swift 4.2 (```2.0``` tag)\n- Swift 2.3 (```swift_2.3``` branch)\n\n## Installation\n#### CocoaPods\n\nYou can use [CocoaPods](http://cocoapods.org/) to install `DatePickerDialog` by adding it to your `Podfile`:\n\n```ruby\nplatform :ios, '8.0'\nuse_frameworks!\npod 'DatePickerDialog'\n```\n\nTo get the full benefits import `DatePickerDialog` wherever you import UIKit\n\n``` swift\nimport UIKit\nimport DatePickerDialog\n```\n#### Carthage\nCreate a `Cartfile` that lists the framework and run `carthage bootstrap`. Follow the [instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios) to add `$(SRCROOT)/Carthage/Build/iOS/DatePickerDialogFramework.framework` to an iOS project.\n\n```\ngithub \"squimer/DatePickerDialog-iOS-Swift\"\n```\n\n#### Manually\n1. Download and drop ```DatePickerDialog.swift``` in your project.\n2. Congratulations!\n\n## Example\n\n```swift\nfunc datePickerTapped() {\n\tDatePickerDialog().show(title: \"DatePicker\", doneButtonTitle: \"Done\", cancelButtonTitle: \"Cancel\", datePickerMode: .date) { date in\n\t\tif let dt = date {\n\t\t\tlet formatter = DateFormatter()\n\t\t\tformatter.dateFormat = \"MM/dd/yyyy\"\n\t\t\tself.textField.text = formatter.string(from: dt)\n\t\t}\n\t}\n}\n```\n\n## Dialog parameters\n\n- showCancelButton: Bool - default true\n- locale: Locale? - default nil\n\nExample without 'Cancel' button:\n``` swift\nDatePickerDialog(showCancelButton: false).show(title: \"DatePicker\", doneButtonTitle: \"Done\", datePickerMode: .date)\n```\n\nExample with custom locale:\n``` swift\nDatePickerDialog(locale: Locale(identifier: \"es_PY\")).show(title: \"DatePicker\", doneButtonTitle: \"Done\", datePickerMode: .date)\n```\n\n## Show parameters\n\n- title: String **(Required)**\n- doneButtonTitle: String\n- cancelButtonTitle: String\n- defaultDate: Date\n- minimumDate: Date\n- maximumDate: Date\n- datePickerMode: UIDatePickerMode **(Required)**\n- callback: ((date: Date) -\u003e Void) **(Required)**\n\n## Special thanks to\n\n* [@wimagguc](https://github.com/wimagguc) for the work with [ios-custom-alertview](https://github.com/wimagguc/ios-custom-alertview) library.\n\n## License\n\nThis code is distributed under the terms and conditions of the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquimer%2Fdatepickerdialog-ios-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquimer%2Fdatepickerdialog-ios-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquimer%2Fdatepickerdialog-ios-swift/lists"}