I want to disable only future dates not all dates currently my code is disabling all dates
func WWCalendarTimeSelectorShouldSelectDate(_ selector: WWCalendarTimeSelector, date: Date) -> Bool {
print(date)
let modifiedDate = Calendar.current.date(byAdding: . day, value: 31, to: date)!
print(modifiedDate)
if modifiedDate >= date{
return false
}else{
return true
}
}
I want to disable dates after 31 dates from selection