2017-07-24 134 views

回答

0
var dateArray = [Date]() 
for cell:FSCalendarCell in calendar.visibleCells() { 
    if cell.isPlaceholder { 
    dateArray.append(calendar.date(for: cell)!) 
    } 
} 

calendar.select(dateArray.min()) 
calendar.select(dateArray.max()) 
+0

我试图做你的建议,但我开始:'可选(2017- 08-26 16:00:00 +0000)'和结束: '可选(2017-10-03 16:00:00 +0000)' –

+0

是的,这就是它如何打印。请尝试选择日历中的日期。检查我更新的答案。 –

相关问题