bendodson/MonthYearWheelPicker

expiryDatePicker.onDateSelected Wont get in

Closed this issue · 2 comments

I'm trying to use your swift file but I have an issue once I call the it I can't get enter the expiryDatePicker.onDateSelected. Where would be the issue in the file?

func textFieldShouldBeginEditing(textField: UITextField) {
    if textField==cardExpireDate{
        let expiryDatePicker = MonthYearPickerView()
        expiryDatePicker.onDateSelected = { (month: Int, year: Int) in
            let string = String(format: "%02d/%d", month, year)
            NSLog(string) // should show something like 05/2015
        }
    }
}

It was my issue code works great

Hey, I'm having the same problem, could you tell me how you fixed it?
Thank you!