In the viewDidLoad () method, change the date picker property, for example, mode. Note that you do not need to leave it changed, you can set it to anything, and then change it to what you really want.
I am sure this solution will help you.
source
share