packages/components/eui-calendar/eui-calendar-monthly.component.ts
| changeDetection | ChangeDetectionStrategy.OnPush |
| selector | eui-calendar-monthly |
| imports |
EuiCalendarDayComponent
NgClass
NgTemplateOutlet
|
| templateUrl | ./eui-calendar-monthly.component.html |
| styleUrl | ./eui-calendar-monthly.scss |
Properties |
Methods |
Inputs |
Outputs |
| date |
Type : Date
|
Default value : new Date()
|
|
The reference date for the month. The component will display the month that contains this date. |
| dayTemplate |
Type : TemplateRef<any>
|
|
Template for rendering each day cell |
| disabledDays |
Type : Date[]
|
Default value : []
|
|
Array of disabled days (Date objects) |
| disabledDaysNotInMonth |
Type : boolean, BooleanInput
|
Default value : true, { transform: booleanAttribute }
|
|
Disable days that are not in the current selected month |
| disableFutureDates |
Type : boolean, BooleanInput
|
Default value : false, { transform: booleanAttribute }
|
|
Disable selection of future dates |
| disablePastDates |
Type : boolean, BooleanInput
|
Default value : false, { transform: booleanAttribute }
|
|
Disable selection of past dates |
| disableWeekends |
Type : boolean, BooleanInput
|
Default value : false, { transform: booleanAttribute }
|
|
Disable selection of weekend dates |
| events |
Type : EuiCalendarEvent[]
|
Default value : []
|
| fillNextMonth |
Type : boolean, BooleanInput
|
Default value : false, { transform: booleanAttribute }
|
|
Fill with next month days |
| fillPreviousMonth |
Type : boolean, BooleanInput
|
Default value : false, { transform: booleanAttribute }
|
|
Fill with previous month days |
| hasEmptyValue |
Type : boolean, BooleanInput
|
Default value : false, { transform: booleanAttribute }
|
| headerTemplate |
Type : TemplateRef<{ date: Date }>
|
|
Template for rendering each day cell |
| mode |
Type : "compact" | "truncated"
|
Default value : 'truncated'
|
|
Display mode of the calendar ('compact' or 'truncated') |
| newEventAddClicked |
Type : EuiCalendarDayCell
|
| addNewItemClicked | ||||||
addNewItemClicked(day: EuiCalendarDayCell)
|
||||||
|
Parameters :
Returns :
void
|
| compareDatesAtDayPrecision |
compareDatesAtDayPrecision(date1: Date, date2: Date)
|
|
Compares two dates at day precision
Returns :
"0" | "1" | unknown
-1 if date1 < date2, 0 if equal, 1 if date1 > date2 |
| createEnhancedDayCell | ||||||||||||||||||||||||||||||
createEnhancedDayCell(day: number, month: number, year: number, isCurrentMonth: boolean, options: object)
|
||||||||||||||||||||||||||||||
|
Creates an enhanced day cell object with comprehensive metadata
Parameters :
Returns :
EuiCalendarDayCell
Enhanced day cell object |
| generateCalendarGrid | ||||||||||||||||||||
generateCalendarGrid(month: number, startingDay: number, options: EuiCalendarMonthlyCalendarOptions)
|
||||||||||||||||||||
|
Generates a calendar grid for a given month
Parameters :
Returns :
[][]
6x7 grid representing the calendar month |
| getDaysInMonth | |||||||||||||||
getDaysInMonth(month: number, year: number)
|
|||||||||||||||
|
Calculates the number of days in a given month
Parameters :
Returns :
number
Number of days in the month |
| getFirstDayOfMonth | |||||||||||||||
getFirstDayOfMonth(month: number, year: number)
|
|||||||||||||||
|
Calculates the day of week for the first day of a month
Parameters :
Returns :
number
Day of week (0=Sunday, 1=Monday, ..., 6=Saturday) |
| getISOWeekNumber | ||||||||
getISOWeekNumber(date: Date)
|
||||||||
|
Calculates the ISO week number for a given date
Parameters :
Returns :
number
ISO week number (1-53) |
| onMouseEnterDay | ||||||
onMouseEnterDay(day: any)
|
||||||
|
Parameters :
Returns :
void
|
| onMouseLeaveDay | ||||||
onMouseLeaveDay(day: any)
|
||||||
|
Parameters :
Returns :
void
|
| trackByDay | |||||||||
trackByDay(index: number, day: EuiCalendarDayCell)
|
|||||||||
|
Parameters :
Returns :
string | number
|