Class: CalendarDay
Defined in: src/classes/CalendarDay.ts:10
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
Defined in: src/classes/CalendarDay.ts:11
Parameters
Parameter | Type | Default value |
---|---|---|
date | Date | undefined |
displayMonth | Date | undefined |
dateLib | DateLib | defaultDateLib |
Returns
Methods
isEqualTo()
isEqualTo(
day
):boolean
Defined in: src/classes/CalendarDay.ts:55
Check if the day is the same as the given day: considering if it is in the same display month.
Parameters
Parameter | Type |
---|---|
day | CalendarDay |
Returns
boolean
Properties
date
readonly
date:Date
Defined in: src/classes/CalendarDay.ts:49
The date represented by this day.
displayMonth
readonly
displayMonth:Date
Defined in: src/classes/CalendarDay.ts:46
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.
outside
readonly
outside:boolean
Defined in: src/classes/CalendarDay.ts:37
Whether the day is not belonging to the displayed month.
When outside
is true
, use displayMonth
to know to which month the day
belongs.