Weekends disabled (synchronous)

The provider returns an array straight away, so nothing is ever pending and no spinner is shown. Note the log below: one call covers about 18 months, because the visible range is expanded by six months on each side.

Slow provider (asynchronous)

The provider resolves after 1200 ms. Until it does, the overlay shows a spinner and sets aria-busy, and the dates render with the loading part — dimmed here — but stay selectable, so a slow backend does not make the calendar unusable. Scroll past the loaded range to see it fetch again.

Failing provider

A provider that rejects fails open: the error is logged, nothing is disabled, and the month is asked for again the next time it comes into range. Turn failures off and scroll a little to watch it heal.

Combined with the other constraints

A date is disabled if it is outside min/max, or isDateDisabled returns true, or the provider's metadata marks it disabled. Here the provider disables weekends, isDateDisabled disables the 16th of each month, and the range is limited to 90 days from today.

Custom part names and clearCache()

The provider marks a few dates busy and almost-full through part, styled below with ::part(). Naming a part does not disable a date — the busy ones stay selectable. Book a date marks the next free weekday busy behind the provider, then calls clearCache(), which re-fetches without replacing the provider function.

Provider calls