-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DatePicker and PickerView issues. #33
Comments
@SoolyChristy right) You want to call Action not to changing the picker? For what? |
if pick first option how i can get the value? |
@SoolyChristy what you mean? better attache image |
@dillidon How can I get the selected date on Done button click in alertcontroller? |
I am having the same issue. Please suggest something |
Very simple solution here.
|
private func selectDate(_ handler: @escaping ((TimeInterval) -> Void)) {
var dateTimeInterval: TimeInterval = 0
let alert = UIAlertController(style: .actionSheet)
alert.addDatePicker(mode: .date, date: nil, minimumDate: nil, maximumDate: nil) { (date) in
dateTimeInterval = date.timeIntervalSince1970
}
alert.addAction(title: "确定", style: .cancel) { (_) in
handler(dateTimeInterval)
}
present(alert, animated: true, completion: nil)
} |
if picker values don't change, it will not call Action
The text was updated successfully, but these errors were encountered: