setDisabledStartDate method

DateTime? setDisabledStartDate({
  1. required CalendarInfo calendarInfo,
})

Implementation

DateTime? setDisabledStartDate({required CalendarInfo calendarInfo}) {
  DateTime? result;
  if (this.year == calendarInfo.year) {
    if (this.month == calendarInfo.month) {
      result = this;
    }
    if (this.month < calendarInfo.month) {
      result = DateTime(calendarInfo.year, calendarInfo.month, 0);
    }
  } else if (this.year < calendarInfo.year) {
    result = DateTime(calendarInfo.year, calendarInfo.month, 0);
  }
  return result;
}