Closed QuaRang1225 closed 1 year ago
let dateRange = vm.pages.map({$0.dateRange.map({$0.dateValue().toStringCalender()})})
for dates in dateRange{
if dates.contains(dateFormatter.string(from: date)){
print(vm.page)
vm.page = vm.pages.first(where:{$0.dateRange.map({$0.dateValue().toStringCalender()}).contains(Timestamp(date: date).dateValue().toStringCalender())})
}else{
print(vm.page)
vm.page = nil
}
}
let dateRange = vm.pages.map({$0.dateRange.map({$0.dateValue().toStringCalender()})})
let dateArr = dateRange.first(where: {$0.contains(dateFormatter.string(from: date))})
guard dateArr != nil else{ return vm.page = nil }
vm.page = vm.pages.first(where:{$0.dateRange.map({$0.dateValue().toStringCalender()}).contains(Timestamp(date: date).dateValue().toStringCalender())})
캘린더에서 가장 빠른 일정의 페이지만 정보가 보임