NepaliSelectableDates

Predicate over CustomCalendar that the date picker UI consults to enable or disable individual days and years. Lives in :nepali-date-picker:core because the converter factories (dev.shivathapaa.nepalidatepickerkmp.calendar_model.NepaliDateConverter.BeforeDateSelectable etc.) also produce instances and we want those callable without the UI artifact on the classpath.

Functions

Link copied to clipboard

Returns a NepaliSelectableDates that delegates to this one but additionally rejects any date marked as a holiday by provider.

Link copied to clipboard
fun NepaliSelectableDates.excludingWeekends(weekend: Set<Int> = NepaliWeekend.Default): NepaliSelectableDates

Returns a NepaliSelectableDates that delegates to this one but additionally rejects weekend days as defined by weekend (default: Saturday only).

Link copied to clipboard
open fun isSelectableDate(customCalendar: CustomCalendar): Boolean

Returns true if the date item representing the customCalendar should be enabled for selection in the UI.

Link copied to clipboard
open fun isSelectableYear(year: Int): Boolean

Returns true if a given year should be enabled for selection in the UI. When a year is defined as non selectable, all the dates in that year will also be non selectable.