DayProps

Per-cell computed flags returned by getDayProps(). Describes the visual and interactive state of a single calendar day cell.

import type { DayProps } from "react-date-range-picker-headless";

Fields

FieldTypeDescription
dateDateThe Date object for this cell.
daynumberDay of month (1-31).
isTodaybooleanThis date is today (or the today override).
isSelectedbooleanThis date is currently selected.
isDisabledbooleanThis date is disabled by minDate, maxDate, or isDateUnavailable.
isInRangebooleanThis date is between the range start and end (exclusive of start/end themselves).
isRangeStartbooleanThis date is the first date of a selected range.
isRangeEndbooleanThis date is the last date of a selected range.
isInHoverRangebooleanThis date is in the hover preview range (between start and hovered date).
isHoverTargetbooleanThis date is the currently hovered date.
hasLeftConnectionbooleanConnected to the previous day (for continuous range background rendering).
hasRightConnectionbooleanConnected to the next day (for continuous range background rendering).
isConsecutiveRangebooleanPart of a multi-day selected range.
isFocusedbooleanThis date has keyboard focus.
dayOfWeeknumberDay of the week (0 = Sunday, 6 = Saturday).
isOutsideDaybooleanThis day belongs to a different month (prev/next) when showOutsideDays is enabled.
isHighlightedbooleanThis day is in the highlightDates array.
isRangeSinglebooleanThis day is both the range start and range end (single-day range).

TypeScript Definition

interface DayProps {
date: Date;
day: number;
isToday: boolean;
isSelected: boolean;
isDisabled: boolean;
isInRange: boolean;
isRangeStart: boolean;
isRangeEnd: boolean;
isInHoverRange: boolean;
isHoverTarget: boolean;
hasLeftConnection: boolean;
hasRightConnection: boolean;
isConsecutiveRange: boolean;
isFocused: boolean;
dayOfWeek: number;
isOutsideDay: boolean;
isHighlighted: boolean;
isRangeSingle: boolean;
}