onDateTap method

dynamic onDateTap (
  1. dynamic date
)

Implementation

onDateTap(date) {
  if (!doesDateRangeExists) {
    setState(() {
      selectedDate = date;
      widget.onDateSelected(date);
    });
  } else if (!isDateBefore(date, widget.startDate) && !isDateAfter(date, widget.endDate)) {
    setState(() {
      selectedDate = date;
      widget.onDateSelected(date);
    });
  } else {}
}