Properties
Section titled "Properties"activeViewChanged
Section titled "activeViewChanged"Inherited from: IgxCalendarBaseDirective
Emits an event when the active view is changed.
<igx-calendar (activeViewChanged)="activeViewChanged($event)"></igx-calendar>public activeViewChanged(event: CalendarView) {
let activeView = event;
} activeViewChanged: EventEmitter<IgxCalendarView> Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:106
cdr: ChangeDetectorRef Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:60
defaultClass
Section titled "defaultClass"defaultClass: boolean = true Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:213
hideOutsideDays
Section titled "hideOutsideDays"Inherited from: IgxCalendarBaseDirective
Sets/gets whether the outside dates (dates that are out of the current month) will be hidden.
Default value is false.
<igx-calendar [hideOutsideDays]="true"></igx-calendar>let hideOutsideDays = this.calendar.hideOutsideDays; hideOutsideDays: boolean = false Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:71
Sets/gets the id of the days view.
If not set, the id will have value "igx-days-view-0".
<igx-days-view id="my-days-view"></igx-days-view>let daysViewId = this.daysView.id; id: string Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:76
role: string = 'grid' Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:84
selected
Section titled "selected"Inherited from: IgxCalendarBaseDirective
Emits an event when a date is selected.
Provides reference the selectedDates property.
selected: EventEmitter<Date | Date[]> Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:78
showWeekNumbers
Section titled "showWeekNumbers"Show/hide week numbers
showWeekNumbers: boolean Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:115
Example
<igx-days-view [showWeekNumbers]="true"></igx-days-view>
`` tabIndex
Section titled "tabIndex"tabIndex: number = 0 Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:80
viewClass
Section titled "viewClass"viewClass: true = true Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:87
viewDateChanged
Section titled "viewDateChanged"Inherited from: IgxCalendarBaseDirective
Emits an event when the month in view is changed.
<igx-calendar (viewDateChanged)="viewDateChanged($event)"></igx-calendar>public viewDateChanged(event: IViewDateChangeEventArgs) {
let viewDate = event.currentValue;
} viewDateChanged: EventEmitter<IViewDateChangeEventArgs> Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:92
Accessors
Section titled "Accessors"activeDate
Section titled "activeDate"get activeDate(): Date Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:128
Returns Date
activeView
Section titled "activeView"Inherited from: IgxCalendarBaseDirective
Gets the current active view.
this.activeView = calendar.activeView; get activeView(): IgxCalendarView Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:374
Returns IgxCalendarView
Sets the current active view.
<igx-calendar [activeView]="year" #calendar></igx-calendar>calendar.activeView = IgxCalendarView.YEAR; set activeView(val: IgxCalendarView): void Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:387
Parameters
- val:
IgxCalendarView
Returns void
disabledDates
Section titled "disabledDates"Inherited from: IgxCalendarBaseDirective
Gets the disabled dates descriptors.
get disabledDates(): DateRangeDescriptor[] Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:567
Returns DateRangeDescriptor[]
Sets the disabled dates' descriptors.
@ViewChild("MyCalendar")
public calendar: IgxCalendarComponent;
ngOnInit(){
this.calendar.disabledDates = [
{type: DateRangeType.Between, dateRange: [new Date("2020-1-1"), new Date("2020-1-15")]},
{type: DateRangeType.Weekends}];
} set disabledDates(value: DateRangeDescriptor[]): void Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:583
Parameters
- value:
DateRangeDescriptor[]
Returns void
formatOptions
Section titled "formatOptions"Inherited from: IgxCalendarBaseDirective
Gets the date format options of the views.
get formatOptions(): IFormattingOptions Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:338
Returns IFormattingOptions
Sets the date format options of the views. Default is { day: 'numeric', month: 'short', weekday: 'short', year: 'numeric' }
set formatOptions(formatOptions: IFormattingOptions): void Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:346
Parameters
- formatOptions:
IFormattingOptions
Returns void
formatViews
Section titled "formatViews"Inherited from: IgxCalendarBaseDirective
Gets whether the day, month and year should be rendered
according to the locale and formatOptions, if any.
get formatViews(): IFormattingViews Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:355
Returns IFormattingViews
Sets whether the day, month and year should be rendered
according to the locale and formatOptions, if any.
set formatViews(formatViews: IFormattingViews): void Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:363
Parameters
- formatViews:
IFormattingViews
Returns void
hideLeadingDays
Section titled "hideLeadingDays"get hideLeadingDays(): boolean Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:152
Returns boolean
set hideLeadingDays(value: boolean): void Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:147
Parameters
- value:
boolean
Returns void
hideTrailingDays
Section titled "hideTrailingDays"get hideTrailingDays(): boolean Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:162
Returns boolean
set hideTrailingDays(value: boolean): void Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:157
Parameters
- value:
boolean
Returns void
locale
Section titled "locale"Inherited from: IgxCalendarBaseDirective
Gets the locale of the calendar.
If not set, defaults to application's locale.
get locale(): string Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:319
Returns string
Sets the locale of the calendar.
Expects a valid BCP 47 language tag.
set locale(value: string): void Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:327
Parameters
- value:
string
Returns void
previewRangeDate
Section titled "previewRangeDate"get previewRangeDate(): Date Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:142
Returns Date
resourceStrings
Section titled "resourceStrings"Inherited from: IgxCalendarBaseDirective
An accessor that returns the resource strings.
get resourceStrings(): ICalendarResourceStrings Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:292
Returns ICalendarResourceStrings
An accessor that sets the resource strings. By default it uses EN resources.
set resourceStrings(value: ICalendarResourceStrings): void Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:285
Parameters
- value:
ICalendarResourceStrings
Returns void
selection
Section titled "selection"Inherited from: IgxCalendarBaseDirective
Gets the selection type.
Default value is "single".
Changing the type of selection resets the currently
selected values if any.
get selection(): string Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:509
Returns string
Sets the selection.
set selection(value: string): void Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:516
Parameters
- value:
string
Returns void
showActiveDay
Section titled "showActiveDay"get showActiveDay(): boolean Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:171
Returns boolean
set showActiveDay(value: boolean): void Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:167
Parameters
- value:
boolean
Returns void
specialDates
Section titled "specialDates"Inherited from: IgxCalendarBaseDirective
Gets the special dates descriptors.
get specialDates(): DateRangeDescriptor[] Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:608
Returns DateRangeDescriptor[]
Sets the special dates' descriptors.
@ViewChild("MyCalendar")
public calendar: IgxCalendarComponent;
ngOnInit(){
this.calendar.specialDates = [
{type: DateRangeType.Between, dateRange: [new Date("2020-1-1"), new Date("2020-1-15")]},
{type: DateRangeType.Weekends}];
} set specialDates(value: DateRangeDescriptor[]): void Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:624
Parameters
- value:
DateRangeDescriptor[]
Returns void
standalone
Section titled "standalone"get standalone(): boolean Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:91
Returns boolean
set standalone(value: boolean): void Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:95
Parameters
- value:
boolean
Returns void
value
Section titled "value"Inherited from: IgxCalendarBaseDirective
Gets the selected date(s).
When selection is set to single, it returns
a single Date object.
Otherwise it is an array of Date objects.
get value(): Date | Date[] Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:636
Returns Date | Date[]
Sets the selected date(s).
When selection is set to single, it accepts
a single Date object.
Otherwise it is an array of Date objects.
set value(value: string | Date | Date[]): void Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:651
Parameters
- value:
string | Date | Date[]
Returns void
viewDate
Section titled "viewDate"Inherited from: IgxCalendarBaseDirective
Gets the date that is presented. By default it is the current date.
get viewDate(): Date Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:537
Returns Date
Sets the date that will be presented in the default view when the component renders.
set viewDate(value: string | Date): void Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:544
Parameters
- value:
string | Date
Returns void
weekStart
Section titled "weekStart"Inherited from: IgxCalendarBaseDirective
Gets the start day of the week. Can return a numeric or an enum representation of the week day. If not set, defaults to the first day of the week for the application locale.
get weekStart(): number Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:302
Returns number
Sets the start day of the week.
Can be assigned to a numeric value or to WEEKDAYS enum value.
set weekStart(value: number): void Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:310
Parameters
- value:
number
Returns void
Methods
Section titled "Methods"deselectDate
Section titled "deselectDate"Inherited from: IgxCalendarBaseDirective
Deselects date(s) (based on the selection type).
deselectDate(value: string | Date | Date[]): void Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:746
Parameters
- value:
string | Date | Date[]
Returns void
formattedYears
Section titled "formattedYears"Inherited from: IgxCalendarBaseDirective
formattedYears(value: Date): string Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:464
Parameters
- value:
Date
Returns string
ngAfterContentChecked
Section titled "ngAfterContentChecked"A callback method that is invoked immediately after the default change detector has completed checking all of the directive's content.
ngAfterContentChecked(): void Defined in projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts:265
Returns void
selectDate
Section titled "selectDate"Inherited from: IgxCalendarBaseDirective
Selects date(s) (based on the selection type).
selectDate(value: string | Date | Date[]): void Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:719
Parameters
- value:
string | Date | Date[]