i’m using this compose library for date picker: (https://github.com/maxkeppeler/sheets-compose-dialogs).
the library accepts only disallowed dates as follow:
disabledDates = listOf(
LocalDate.now().plusDays(3),
LocalDate.now().plusDays(5),
LocalDate.now().plusDays(7),
)
CalendarView(
useCaseState = rememberUseCaseState(),
config = CalendarConfig(
style = CalendarStyle.MONTH,
disabledDates = disabledDates,
boundary = (LocalDate.now()..LocalDate.now().plusYears(10))
), selection = CalendarSelection.Date { newDate ->
selectedDate.value = newDate
})
the issue is that i need to pass few allowed dates instead, how can achieve this?
is there a way to convert the allowed dates into a list of disallowed dates or something?