Question:
I would like to receive a notification when the user dismisses the pop-up calendar for a .compact style UIDatePicker. The user may trigger several valueChanged while trying to select the right date, so I would like to get notified when the user taps outside the calendar to dismiss it.Answer:
You can try to observeeditingDidEnd
control event:yourDatePicker.addTarget(self, action: #selector(yourCallback), for: .editingDidEnd)
If you have better answer, please add a comment about this, thank you!
Leave a Review