IDay

interface
Date & Time

Data shape for a single day cell in the Calendar grid. Carries display strings, boolean flags for all calendar states (selected, disabled, adjacent, etc.) and the raw adapter date value.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

date
required
unknown
Raw adapter date value for this cell.
isoDate
required
string
ISO-8601 date string (YYYY-MM-DD) for this cell.
formatted
required
string
Adapter-formatted display string for the day number.
year
required
number
Four-digit year of this cell.
month
required
number
Zero-based month index of this cell.
isDisabled
required
boolean
True when the day is outside the allowed date range.
isWeekStart
required
boolean
True when the day is the first day of a week row.
isWeekEnd
required
boolean
True when the day is the last day of a week row.
isToday
required
boolean
True when the day corresponds to today's date.
isAdjacent
required
boolean
True when the day belongs to the previous or next month (overflow cell).
isHidden
required
boolean
True when the cell should be visually hidden.
isStart
required
boolean
True when the day is the start of a selected range.
isSelected
required
boolean
True when the day is the selected date or within a selected range.
isEnd
required
boolean
True when the day is the end of a selected range.
isSame
required
boolean
True when start and end of the range land on the same day.
localized
required
string
Locale-aware display string for the day number (e.g. "١" in Arabic).

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Consuming IDay in a calendar slot

typescript