All Projects → squimer → Datepickerdialog Ios Swift

squimer / Datepickerdialog Ios Swift

Licence: mit
Date picker dialog for iOS

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Datepickerdialog Ios Swift

Date Fns
⏳ Modern JavaScript date utility library ⌛️
Stars: ✭ 27,650 (+5636.51%)
Mutual labels:  hacktoberfest, date
Timeago.dart
A library useful for creating fuzzy timestamps. (e.g. "5 minutes ago")
Stars: ✭ 293 (-39.21%)
Mutual labels:  hacktoberfest, date
Date Io
Abstraction over common javascript date management libraries
Stars: ✭ 382 (-20.75%)
Mutual labels:  hacktoberfest, date
Prism
Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Xamarin Forms, and Uno / Win UI Applications..
Stars: ✭ 4,842 (+904.56%)
Mutual labels:  hacktoberfest
Practical rl
A course in reinforcement learning in the wild
Stars: ✭ 4,741 (+883.61%)
Mutual labels:  hacktoberfest
Git Fresh
🍋 Keep your Git repo fresh.
Stars: ✭ 480 (-0.41%)
Mutual labels:  hacktoberfest
Laravel Dompdf
A DOMPDF Wrapper for Laravel
Stars: ✭ 4,978 (+932.78%)
Mutual labels:  hacktoberfest
Juice Shop
OWASP Juice Shop: Probably the most modern and sophisticated insecure web application
Stars: ✭ 6,270 (+1200.83%)
Mutual labels:  hacktoberfest
Ferret
Declarative web scraping
Stars: ✭ 4,837 (+903.53%)
Mutual labels:  hacktoberfest
Ztm Job Board
⚛️ A place for developers to show recruiters they are available for hire
Stars: ✭ 480 (-0.41%)
Mutual labels:  hacktoberfest
Monk v1
Monk is a low code Deep Learning tool and a unified wrapper for Computer Vision.
Stars: ✭ 480 (-0.41%)
Mutual labels:  hacktoberfest
Ember Bootstrap
Ember-cli addon for using Bootstrap as native Ember components.
Stars: ✭ 475 (-1.45%)
Mutual labels:  hacktoberfest
Droplet kit
DropletKit is the official DigitalOcean API client for Ruby.
Stars: ✭ 482 (+0%)
Mutual labels:  hacktoberfest
Preact Cli
😺 Your next Preact PWA starts in 30 seconds.
Stars: ✭ 4,510 (+835.68%)
Mutual labels:  hacktoberfest
Mautic
Mautic: Open Source Marketing Automation Software.
Stars: ✭ 4,887 (+913.9%)
Mutual labels:  hacktoberfest
React Native Tab View
A cross-platform Tab View component for React Native
Stars: ✭ 4,742 (+883.82%)
Mutual labels:  hacktoberfest
Quartznet
Quartz Enterprise Scheduler .NET
Stars: ✭ 4,825 (+901.04%)
Mutual labels:  hacktoberfest
Devchallenge
A website for developers to improve their skills by doing front-end and back-end challenges
Stars: ✭ 475 (-1.45%)
Mutual labels:  hacktoberfest
Rust Sloth
A 3D software rasterizer... for the terminal!
Stars: ✭ 478 (-0.83%)
Mutual labels:  hacktoberfest
Code Golf
A game designed to let you show off your code-fu by solving problems in the least number of characters.
Stars: ✭ 479 (-0.62%)
Mutual labels:  hacktoberfest

DatePickerDialog 4.0 - iOS - Swift

DatePickerDialog is an iOS drop-in classe that displays an UIDatePicker within an UIAlertView.

Requirements

DatePickerDialog 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:

  • Foundation
  • UIKit

Swift Versions

  • Swift 5.3 (Current)
  • Swift 4.2 (3.0 tag)
  • Swift 4.2 (2.1 tag)
  • Swift 4.2 (2.0 tag)
  • Swift 2.3 (swift_2.3 branch)

Installation

CocoaPods

You can use CocoaPods to install DatePickerDialog by adding it to your Podfile:

platform :ios, '8.0'
use_frameworks!
pod 'DatePickerDialog'

To get the full benefits import DatePickerDialog wherever you import UIKit

import UIKit
import DatePickerDialog

Carthage

Create a Cartfile that lists the framework and run carthage bootstrap. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/DatePickerDialogFramework.framework to an iOS project.

github "squimer/DatePickerDialog-iOS-Swift"

Manually

  1. Download and drop DatePickerDialog.swift in your project.
  2. Congratulations!

Example

func datePickerTapped() {
	DatePickerDialog().show(title: "DatePicker", doneButtonTitle: "Done", cancelButtonTitle: "Cancel", datePickerMode: .date) { date in
		if let dt = date {
			let formatter = DateFormatter()
			formatter.dateFormat = "MM/dd/yyyy"
			self.textField.text = formatter.string(from: dt)
		}
	}
}

Dialog parameters

  • showCancelButton: Bool - default true
  • locale: Locale? - default nil

Example without 'Cancel' button:

DatePickerDialog(showCancelButton: false).show(title: "DatePicker", doneButtonTitle: "Done", datePickerMode: .date)

Example with custom locale:

DatePickerDialog(locale: Locale(identifier: "es_PY")).show(title: "DatePicker", doneButtonTitle: "Done", datePickerMode: .date)

Show parameters

  • title: String (Required)
  • doneButtonTitle: String
  • cancelButtonTitle: String
  • defaultDate: Date
  • minimumDate: Date
  • maximumDate: Date
  • datePickerMode: UIDatePickerMode (Required)
  • callback: ((date: Date) -> Void) (Required)

Special thanks to

License

This code is distributed under the terms and conditions of the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].