API Reference
OutOfRangeBehavior
interfaceControls how a WeeksView window behaves when navigation would move it
past the min/max bounds.
min/max always restrict which **days are selectable**. outOfRangeBehavior
is a separate concern: it decides whether the **visible window** may scroll
beyond those bounds, and how the edge is handled.
- "unbounded" — Navigation is never restricted by min/max; any range of
weeks can be viewed. Out-of-range days simply render disabled. (Default.)
- "stop" — Navigation halts at the boundary: the Prev/Next button is
disabled once the next step would show a window containing no in-range day.
- "stop-shrink" — Like "stop", but near the edge the window **shrinks** to
fewer week rows instead of showing rows that are entirely out of range.
- "snap" — A jump that would overshoot **snaps** the window so its edge
aligns to the last/first in-range week, rather than stopping or overshooting.
- "snap-shrink" — Snap to the boundary, then **shrink** the window to just
the in-range weeks.
"snap" and "snap-shrink" are identical **unless the selectable range spans
fewer weeks than weekCount** — i.e. the window is taller than the range.
Snapping can only pin *one* edge to a bound; if the range is narrower than the
window, the opposite edge still overhangs into out-of-range weeks. "snap"
keeps the full weekCount (padding the overhang with all-disabled week rows),
while "snap-shrink" trims those rows so only the in-range weeks show.
Example with weekCount: 6 and a min/max that span just 2 weeks: "snap"
shows 6 rows (4 of them fully disabled), "snap-shrink" shows 2 rows. When
the range is ≥ weekCount weeks wide, the snapped window already fits, so the
two behave the same.
Defined in package/src/out-of-range.ts:35
| Prop | Type | Default | Description |
|---|---|---|---|
| toString* | () => string | — | |
| charAt* | (pos: number) => string | — | |
| charCodeAt* | (index: number) => number | — | |
| concat* | (...strings: string[]) => string | — | |
| indexOf* | (searchString: string, position?: number | undefined) => number | — | |
| lastIndexOf* | (searchString: string, position?: number | undefined) => number | — | |
| localeCompare* | { (that: string): number; (that: string, locales?: string | string[] | undefined, options?: Intl.CollatorOptions | undefined): number; (that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions | undefined): number; } | — | |
| match* | { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; } | — | |
| replace* | { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; (searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; } | — | |
| search* | { (regexp: string | RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; } | — | |
| slice* | (start?: number | undefined, end?: number | undefined) => string | — | |
| split* | { (separator: string | RegExp, limit?: number | undefined): string[]; (splitter: { [Symbol.split](string: string, limit?: number | undefined): string[]; }, limit?: number | undefined): string[]; } | — | |
| substring* | (start: number, end?: number | undefined) => string | — | |
| toLowerCase* | () => string | — | |
| toLocaleLowerCase* | { (locales?: string | string[] | undefined): string; (locales?: Intl.LocalesArgument): string; } | — | |
| toUpperCase* | () => string | — | |
| toLocaleUpperCase* | { (locales?: string | string[] | undefined): string; (locales?: Intl.LocalesArgument): string; } | — | |
| trim* | () => string | — | |
| length* | number | — | |
| substr* | (from: number, length?: number | undefined) => string | — | |
| valueOf* | () => string | — | |
| codePointAt* | (pos: number) => number | undefined | — | |
| includes* | (searchString: string, position?: number | undefined) => boolean | — | |
| endsWith* | (searchString: string, endPosition?: number | undefined) => boolean | — | |
| normalize* | { (form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; (form?: string | undefined): string; } | — | |
| repeat* | (count: number) => string | — | |
| startsWith* | (searchString: string, position?: number | undefined) => boolean | — | |
| anchor* | (name: string) => string | — | |
| big* | () => string | — | |
| blink* | () => string | — | |
| bold* | () => string | — | |
| fixed* | () => string | — | |
| fontcolor* | (color: string) => string | — | |
| fontsize* | { (size: number): string; (size: string): string; } | — | |
| italics* | () => string | — | |
| link* | (url: string) => string | — | |
| small* | () => string | — | |
| strike* | () => string | — | |
| sub* | () => string | — | |
| sup* | () => string | — | |
| padStart* | (maxLength: number, fillString?: string | undefined) => string | — | |
| padEnd* | (maxLength: number, fillString?: string | undefined) => string | — | |
| trimEnd* | () => string | — | |
| trimStart* | () => string | — | |
| trimLeft* | () => string | — | |
| trimRight* | () => string | — | |
| matchAll* | (regexp: RegExp) => RegExpStringIterator<RegExpExecArray> | — | |
| replaceAll* | { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } | — | |
| at* | (index: number) => string | undefined | — | |
| isWellFormed* | () => boolean | — | |
| toWellFormed* | () => string | — | |
| __@iterator@514* | () => StringIterator<string> | — |
Members
"unbounded""stop""stop-shrink""snap""snap-shrink"