UIDatePickerView compact not highlighting selection.

i have a UIDatePickerView in compact style and for some reason highlighting of selected date has stopped working. I notice that the date is selected (from action method valueChanged) but the light blue circle highlighting the date is not showing up.

what could be the reason?

i am using storyboard and objective c

It seems that compact mode has some specific behaviour.

For instance, it does not hide automatically the calendar after selection (need to tap outside).

https://stackoverflow.com/questions/67109078/close-uidatepicker-after-selection-when-style-is-compact

However, I tested in Xcode 14ß5, Swift, with a compact mode datePicker, selection appears correctly highlighted:

Accepted Answer

I was hiding and unhiding the pickerview improperly.

UIDatePickerView compact not highlighting selection.
 
 
Q