SelectableDates

fun interface SelectableDates

A functional interface to determine which dates are selectable in the calendar.

This allows you to customize which dates can be selected by the user. Common use cases include:

  • Disabling past dates

  • Disabling future dates

  • Disabling weekends

  • Disabling specific dates (e.g., holidays)

Example:

// Only allow future dates
SelectableDates { date -> date today }

// Only allow weekdays
SelectableDates { date ->
date.dayOfWeek != DayOfWeek.SATURDAY && date.dayOfWeek != DayOfWeek.SUNDAY
}

Functions

Link copied to clipboard
abstract fun isSelectable(date: LocalDate): Boolean

Determines if the given date is selectable.