SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

rangePreview

Hover-and-focus range preview for a RangeCalendar grid.

tsx
import { rangePreview } from "@sdxc/ui/mixins";

Usage

Adds hover/focus range-preview behavior to a RangeCalendar grid, extending model's pending range toward the hovered or focused day cell once an anchor is set, and mirroring the result onto every day cell as attributes.

Signature

typescript
rangePreview(model: CalendarModel): MixinDescriptor<HTMLElement>

Parameters

ParameterTypeDefaultRequiredDescription
modelCalendarModel—YesCalendar model already constructed by the consumer, shared with any calendarKeys() mixin applied to the same grid.

Examples

tsx
let model = new CalendarModel();
<div role="grid" mix={[calendarKeys(model), rangePreview(model)]} />
@sdxc/ui

Can’t find it? Contact us