diff --git a/lib/core/styles/_index.scss b/lib/core/styles/_index.scss index 31c2d61ea6..8db9b4d30c 100644 --- a/lib/core/styles/_index.scss +++ b/lib/core/styles/_index.scss @@ -74,5 +74,7 @@ @include adf-clipboard-theme($theme); @include adf-snackbar-theme($theme); @include mat-expansion-panel-theme--fix($theme); + @include mat-calendar-theme--fix($theme); + @include mat-datetimepicker-theme--fix($theme); @include adf-search-text-input-theme($theme); } diff --git a/lib/core/styles/_mixins.scss b/lib/core/styles/_mixins.scss index 1e26f473b4..590c79d0de 100644 --- a/lib/core/styles/_mixins.scss +++ b/lib/core/styles/_mixins.scss @@ -80,3 +80,58 @@ } } } + +@mixin mat-calendar-theme--fix($theme) { + $foreground: map-get($theme, foreground); + + .mat-calendar { + .mat-calendar-header { + button { + color: mat-color($foreground, text, 0.87); + + &:disabled { + color: mat-color($foreground, text, 0.54); + } + } + } + .mat-calendar-content { + .mat-calendar-table-header th { + color: mat-color($foreground, text, 0.54); + } + + .mat-calendar-body-disabled > div { + color: mat-color($foreground, text, 0.54) !important; + } + } + } +} + +@mixin mat-datetimepicker-theme--fix($theme) { + $foreground: map-get($theme, foreground); + + .mat-datetimepicker-calendar { + .mat-datetimepicker-calendar-header { + .mat-datetimepicker-calendar-header-year { + opacity: 1; + } + + .mat-datetimepicker-calendar-header-date { + opacity: 1; + } + + .mat-datetimepicker-calendar-header-time { + opacity: 1; + } + } + + .mat-datetimepicker-calendar-content { + .mat-datetimepicker-calendar-table-header th { + color: mat-color($foreground, text, 0.54); + } + + .mat-datetimepicker-calendar-body-disabled > div { + color: mat-color($foreground, text, 0.54); + } + } + } +}