Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9ea525c
fix(calendar): fix material and indigo theme styles to match webC
desig9stein Oct 27, 2025
46b31a6
fix(calendar): update Fluent theme styles to align with design guidel…
desig9stein Oct 30, 2025
e04056f
Merge branch '20.1.x' into mpopov/refactoring/calendar
desig9stein Oct 30, 2025
1aff4d7
fix(calendar): fix calendar bootstrap theme parity with web components
desig9stein Nov 3, 2025
a32ed95
fix(calendar): update Indigo theme styles for improved consistency
desig9stein Nov 5, 2025
06267e5
Merge branch '20.1.x' into mpopov/refactoring/calendar
desig9stein Nov 6, 2025
1e48d77
Merge branch '20.1.x' into mpopov/refactoring/calendar
desig9stein Nov 7, 2025
8eea502
Merge branch '20.1.x' into mpopov/refactoring/calendar
SisIvanova Nov 11, 2025
f7c353f
fix(calendar): refine bootstrap theme styles for date range and selec…
desig9stein Nov 12, 2025
ba24941
fix(calendar): update styles for Fluent theme range and preview
desig9stein Nov 13, 2025
69c5878
fix(calendar): enhance Material theme styles for range and selection …
desig9stein Nov 13, 2025
af0137c
Merge branch '20.1.x' into mpopov/refactoring/calendar
desig9stein Nov 13, 2025
35afa20
fix(calendar): adjust date range border radius styles for fluent theme
desig9stein Nov 17, 2025
fac68c8
fix(calendar): theme styles
desig9stein Nov 18, 2025
d22827a
Merge branch '20.1.x' into mpopov/refactoring/calendar
desig9stein Nov 18, 2025
0b6ba0e
Merge branch '20.1.x' into mpopov/refactoring/calendar
desig9stein Nov 19, 2025
3a6f565
Merge branch '20.1.x' into mpopov/refactoring/calendar
desig9stein Nov 20, 2025
022bbdc
fix(calendar): update theme styles for improved consistency across va…
desig9stein Nov 20, 2025
b0c2bb5
fix(calendar): refactor and simplify theme styles
desig9stein Nov 24, 2025
195474b
fix(calendar): add comprehensive Fluent theme styles for date states
desig9stein Nov 25, 2025
f0932b9
refactor(calendar): add theme support for `IgxDaysViewComponent`
desig9stein Nov 25, 2025
681a90f
Merge branch '20.1.x' into mpopov/refactoring/calendar
desig9stein Nov 26, 2025
7497afc
fix(calendar): correct theme token import path in `days-view` component
desig9stein Nov 26, 2025
2c295dc
fix(calendar): Fluent theme styles for month/year
desig9stein Nov 26, 2025
e43c862
fix(calendar): Fluent theme styles for month/year
desig9stein Nov 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@
{
"type": "bundle",
"name": "styles",
"maximumWarning": "500kb",
"maximumError": "550kb"
"maximumWarning": "600kb",
"maximumError": "600kb"
},
{
"type": "anyComponentStyle",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import {
booleanAttribute,
ElementRef,
ChangeDetectorRef,
ChangeDetectionStrategy,
ChangeDetectionStrategy, inject, DestroyRef, AfterContentChecked,
} from '@angular/core';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { TitleCasePipe } from '@angular/common';
import { CalendarSelection, ScrollDirection } from '../../calendar/calendar';
import { IgxDayItemComponent } from './day-item.component';
import { DateRangeType } from '../../core/dates';
import { IgxCalendarBaseDirective } from '../calendar-base';
import { PlatformUtil, intoChunks } from '../../core/utils';
import {PlatformUtil, intoChunks, getComponentTheme} from '../../core/utils';
import { IViewChangingEventArgs } from './days-view.interface';
import {
areSameMonth,
Expand All @@ -31,6 +31,7 @@ import {
isDateInRanges,
} from "../common/helpers";
import { CalendarDay } from '../common/model';
import {IgxTheme, THEME_TOKEN, ThemeToken} from "../../services/theme/theme.token";

let NEXT_ID = 0;

Expand All @@ -47,7 +48,7 @@ let NEXT_ID = 0;
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [IgxDayItemComponent, TitleCasePipe]
})
export class IgxDaysViewComponent extends IgxCalendarBaseDirective {
export class IgxDaysViewComponent extends IgxCalendarBaseDirective implements AfterContentChecked {
#standalone = true;

/**
Expand Down Expand Up @@ -197,6 +198,42 @@ export class IgxDaysViewComponent extends IgxCalendarBaseDirective {
private _hideTrailingDays: boolean;
private _showActiveDay: boolean;

private _destroyRef = inject(DestroyRef);
private _theme: IgxTheme;

@HostBinding('class.igx-days-view')
public defaultClass = true;

// Theme-specific classes
@HostBinding('class.igx-days-view--material')
public get isMaterial(): boolean {
return this._theme === 'material';
}

@HostBinding('class.igx-days-view--fluent')
public get isFluent(): boolean {
return this._theme === 'fluent';
}

@HostBinding('class.igx-days-view--bootstrap')
public get isBootstrap(): boolean {
return this._theme === 'bootstrap';
}

@HostBinding('class.igx-days-view--indigo')
public get isIndigo(): boolean {
return this._theme === 'indigo';
}

@Input()
public set theme(value: IgxTheme) {
this._theme = value;
}

public get theme(): IgxTheme {
return this._theme;
}

/**
* @hidden
*/
Expand All @@ -205,8 +242,37 @@ export class IgxDaysViewComponent extends IgxCalendarBaseDirective {
@Inject(LOCALE_ID) _localeId: string,
protected el: ElementRef,
public override cdr: ChangeDetectorRef,
@Inject(THEME_TOKEN) private themeToken: ThemeToken

) {
super(platform, _localeId, null, cdr);

this._theme = this.themeToken.theme;

const themeChange = this.themeToken.onChange((theme) => {
if (this._theme !== theme) {
this._theme = theme;
this.cdr.detectChanges();
}
});

this._destroyRef.onDestroy(() => themeChange.unsubscribe());
}

private setComponentTheme() {
// allow DOM theme override (same pattern as input-group)
if (!this.themeToken.preferToken) {
const theme = getComponentTheme(this.el.nativeElement);

if (theme && theme !== this._theme) {
this.theme = theme;
this.cdr.markForCheck();
}
}
}

public ngAfterContentChecked() {
this.setComponentTheme();
}

/**
Expand Down
Loading
Loading