I am using UIDatePicker in my app and I want to disable only date selection in it and time selection should not be effected.
Can anyone help me with this.
I am using UIDatePicker in my app and I want to disable only date selection in it and time selection should not be effected.
Can anyone help me with this.
In addition to the correct answers to set it programmatically, you can also set it on your xib file , in the attributes inspector tab.
Set the
datePickerMode
toUIDatePickerModeTime
.Please try this:
Other options are:
Change the UIDatePickerMode from UIDatePickerModeDateAndTime to UIDatePickerModeTime like this...
This will do the job
by using Attribute inspector in the GUI you could also set it as follows