I am getting my JSON data from the server, server get data from the sensor placed in different places collecting info between 6 am-10 pm. I implemented datepicker to be chosen any spefici time wanted to be seen by user. However I would like to exclude 10pm-6am? I want to design my datepicker in a way user could not able choose any time between 10pm-6am. Is there any way to achieve this goal?

I am getting my JSON data from the server, server get data from the
Share
You’ll need to use a
UIPickerView, by making 4 segments as date picker and populate them through arrayssince
UIDatePickerdoes not inherit fromUIPickerView(which it says in the last sentence of the “Overview” in the Apple documentation which I linked for you).UIPickerViewis what uses a data source.UIDatePickerhas a built-in data source which developers can’t touch.So, just dump the customised data to the 4 segmented normal picker view.