days property

List<int> get days

Implementation

List<int> get days {
  if (selectedYear != null && selectedMonth != null) {
    // Calculate the number of days in the selected month and year
    int daysInMonth = DateTime(selectedYear!, selectedMonth! + 1, 0).day;
    return List<int>.generate(daysInMonth, (int index) => index + 1);
  }
  // Default to 31 days if no month/year is selected
  return List<int>.generate(31, (int index) => index + 1);
}