Reputation: 20078
Right now I am using an UIDatePicker
with mode set to Time
only. So I can choose between AM and PM time.
Is there a way to prevent choosing PM time ? My app is using a morning routine so there is no point on selecting PM time.
At least I want to always show an AM time, right now it displays the current time (so if it's PM, I have to change it to AM).
Upvotes: 0
Views: 94
Reputation: 536047
Set the date picker's minimumDate
to midnight and its maximumDate
to noon. Also, if (as you say) it is currently after noon, set the date picker's date
to 12 hours earlier.
Upvotes: 1