Skip to main content

Class: CalendarDay

Represent the day displayed in the calendar.

In DayPicker, a Day is a Date that can be displayed in the calendar. It is used as extension of the native Date object to provide additional information about the day.

Constructors

new CalendarDay()

new CalendarDay(date, displayMonth, dateLib): CalendarDay

Parameters

ParameterTypeDefault value
dateDateundefined
displayMonthDateundefined
dateLibDateLibdefaultDateLib

Returns

CalendarDay

Defined in

src/classes/CalendarDay.ts:11

Methods

isEqualTo()

isEqualTo(day): boolean

Check if the day is the same as the given day: considering if it is in the same display month.

Parameters

ParameterType
dayCalendarDay

Returns

boolean

Defined in

src/classes/CalendarDay.ts:55

Properties

date

readonly date: Date

The date represented by this day.

Defined in

src/classes/CalendarDay.ts:49


displayMonth

readonly displayMonth: Date

The months where the day is displayed.

In DayPicker, days can fall out the displayed months (e.g. when showOutsideDays is true). This property is useful to know if the day is in the same month of the displayed month.

Defined in

src/classes/CalendarDay.ts:46


outside

readonly outside: boolean

Whether the day is not belonging to the displayed month.

When outside is true, use displayMonth to know to which month the day belongs.

Defined in

src/classes/CalendarDay.ts:37