<Android Calendar doesn't add Day> val dayCalendar...
# stackoverflow
u
Android Calendar doesn't add Day val dayCalendar = Calendar.getInstance() dayCalendar.time = entryDateC.time for (day in 1..howManyDays) { dayCalendar.add(Calendar.DAY_OF_MONTH, 1) if (!disabledDays.contains(dayCalendar)) { disabledDays.add(dayCalendar) } } I checked and made sure that howManyDays is 30 by logging day inside the for loop. What I'm trying to do, is to add to the disabledDays each day for one month after the entryDate, but this code doesn't seem to work, any help?