diff --git a/projects/addon-mobile/components/mobile-calendar/mobile-calendar.component.ts b/projects/addon-mobile/components/mobile-calendar/mobile-calendar.component.ts index 364ea2b009701..ba7d24c193e91 100644 --- a/projects/addon-mobile/components/mobile-calendar/mobile-calendar.component.ts +++ b/projects/addon-mobile/components/mobile-calendar/mobile-calendar.component.ts @@ -73,7 +73,11 @@ import { styleUrls: ['./mobile-calendar.style.less'], changeDetection: ChangeDetectionStrategy.OnPush, providers: TUI_MOBILE_CALENDAR_PROVIDERS, - host: {'[class._ios]': 'isIOS', '[class._initialized]': 'initialized'}, + host: { + '[class._ios]': 'isIOS', + '[class._initialized]': 'initialized', + '[class._without_header]': '!chooseDayOrRangeTexts$', + }, }) export class TuiMobileCalendarComponent implements AfterViewInit { @ViewChild('yearsScrollRef') diff --git a/projects/addon-mobile/components/mobile-calendar/mobile-calendar.style.less b/projects/addon-mobile/components/mobile-calendar/mobile-calendar.style.less index 7565b4a51dd5a..0d5d7dd0b31ba 100644 --- a/projects/addon-mobile/components/mobile-calendar/mobile-calendar.style.less +++ b/projects/addon-mobile/components/mobile-calendar/mobile-calendar.style.less @@ -6,6 +6,7 @@ @background: var(--tui-base-01); :host { + --tui-mobile-calendar-header-height: 3.5rem; display: block; height: 100%; font-family: -apple-system, BlinkMacSystemFont, Roboto, sans-serif; @@ -13,6 +14,10 @@ -webkit-tap-highlight-color: transparent; } +:host(._without_header) { + --tui-mobile-calendar-header-height: 0rem; +} + .t-header { position: relative; display: flex; @@ -164,7 +169,7 @@ .t-months { .scrollbar-hidden(); - height: ~'calc(100% - 9.5rem)'; + height: ~'calc(100% - 6rem - var(--tui-mobile-calendar-header-height))'; box-shadow: 0 -1px @border; overflow-x: hidden;