解决方法
datePicker.datePickerMode = UIDatePickerModeDate;
UIDatePickerModeDate
The date picker displays months,days of the month,and years. The exact order of these items depends on the locale setting. An example
of this mode is [ November | 15 | 2007 ].06001
您也可以从故事板设置模式更改:(参见屏幕截图)