nearestSelectableDate static method
Implementation
static DateTime nearestSelectableDate(
DateTime selectedDay,
DateTime? from,
DateTime? to,
Map<String, Map<String, dynamic>> blockedDates,
Map<String, List<TimeRange>>? availability) {
if (isDateSelectable(selectedDay, from, to, blockedDates, availability)) {
return selectedDay;
} else {
return nearestSelectableDate(selectedDay.add(const Duration(days: 1)),
from, to, blockedDates, availability);
}
}