squimer / DatePickerDialog-iOS-Swift

Date picker dialog for iOS
MIT License
582 stars 177 forks source link

How to handle cancel button? #26

Closed jgutierrez11 closed 8 years ago

jgutierrez11 commented 8 years ago

When i press cancel the label showing the date resets its content.

lfarah commented 8 years ago

I'm working on this right now...

lfarah commented 8 years ago

Hey @jgutierrez11, I updated the lib. Now on the callback you can do this:

if date != nil {
    self.textField.text = "\(date)"
    } else {
    self.textField.text = ""
}