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

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

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

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>
``

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

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

Returns void

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

Returns void

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

Returns void

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

Returns void

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

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

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

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

Returns void

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

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

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

Returns void

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

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

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

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

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

Inherited from: IgxCalendarBaseDirective

formattedYears(value: Date): string

Defined in projects/igniteui-angular/calendar/src/calendar/calendar-base.ts:464

Parameters

  • value: Date

Returns string

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

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[]

Returns void