1

I am able to select certain dates while loading the FSCalendar. But I want to load calendar with all dates selected.

var attendance_list = [NSManagedObject]();
//After loading data
for attendanceObj in attendance_list{

            let createdDate =   attendanceObj.value(forKey: "date") as! String;
            self.calendar.select(Utils.convertStringToDate(createdDate)) 
}

Above code is for selecting dates from an array.
How can I select all dates without any array ?

4

1 回答 1

0

我不建议选择从时间开始到可预见的未来结束的所有日期(此外,如果没有数组,您将无法做到这一点)。我建议在(另一种可用方法)中获取beginingOfMonthand endOfMonth(两种方法都可用)。currentPageDidChange然后将这两个日期之间的日期设置selected为循环内。

于 2017-04-21T01:38:39.327 回答