Comments (3)
@benjohnde
Still getting this error
from datepickerdialog-ios-swift.
Check, that's in your demo project as the syntax has changed. I am working on it. You will receive another PR today. The actual library is working as intended.
As of now, the func datePickerTapped
should be like the following:
/* IBActions */
@IBAction func datePickerTapped(sender: AnyObject) {
let currentDate = Date()
var dateComponents = DateComponents()
dateComponents.month = -3
let threeMonthAgo = Calendar.current.date(byAdding: dateComponents, to: currentDate)
DatePickerDialog().show(title: "DatePickerDialog", doneButtonTitle: "Done", cancelButtonTitle: "Cancel", minimumDate: threeMonthAgo, maximumDate: currentDate, datePickerMode: .date) {
(date) -> Void in
if let dt = date {
self.textField.text = "\(dt)"
} else {
print("")
}
}
}
Cheers, Ben!
from datepickerdialog-ios-swift.
You may also need to set the project you are using to the latest Swift syntax.
You can achieve that by explicitly setting "Use Legacy Swift Language Version" to "No" under "Build Settings". Saying that, I assume you are using the latest Xcode 8 😃
from datepickerdialog-ios-swift.
Related Issues (20)
- fails at appDelegate.window when window is in scene delegate HOT 6
- DatePickerDialog not displaying in iOS13 HOT 2
- Instance member 'show' cannot be used on type 'DatePickerDialog'; did you mean to use a value of this type instead?
- Date picker dialogue not showing when called from didSelectRowAtIndexPath delegate function of UITableView. HOT 1
- Dialog not showing in iOS 13 HOT 4
- Dark Mode support HOT 2
- Bug on iOS 14 | _UIDatePickerIOSCompactView _setTextColor | HOT 1
- datepickerview display format
- iOS 14 handling preferredDatePickerStyle HOT 2
- Not working correctly with ios 14 HOT 14
- DatePickerDialog doesn't show correctly HOT 1
- Doesn't appear on simulator HOT 3
- How set date for datepicker?
- Close Dialog when parent viewController is removed from stack?
- Interval
- iOS 15 preferredDatePickerStyle inline Time not working
- Dialog not showing on iOS 16
- not open dialog popup HOT 1
- return selected date
- Not able to install it using SPM
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datepickerdialog-ios-swift.