eventDecorator
A NepaliDayDecorator that marks the days policy says the institution is closed: its weekly off days, and the holidays its provider reports.
A day takes one colour. A named holiday is coloured by the strongest kind on it, a closure before a festival, a festival before a regional holiday, and all three before an observance; a day that is only a weekly off day takes NepaliDayMarkerColors.weeklyOffColor. A Saturday that is also Dashain is Dashain, because that is the more specific fact about it, but a Saturday that merely carries an observance stays a Saturday: a kind that does not close the office cannot make a closed day look open.
Nothing is dotted unless style asks for it, so the dots a grid draws stay available for the app's own events. Compose the two with then:
NepaliDatePicker(
state = state,
dayDecorator = NepaliDatePickerDefaults
.eventDecorator(policy = schoolPolicy)
.then(NepaliDatePickerDefaults.dayDecorator(markers = myEvents))
)The decorator reads NepaliEventProvider.events once per visible cell, so a provider that answers from a memoized source keeps the grid cheap, as the SPI asks. Marking a day never blocks it: pass NepaliCalendarPolicy.asSelectableDates to the state when a screen should also refuse the days it marks.
eventDecorator for an institution that keeps Nepal's usual week, Saturday off, or none at all. weeklyOffDays = emptySet() marks the provider's holidays and leaves every weekday alone.