From 41bcafab8f77676f11954a69dc9f4e3347b0f4dc Mon Sep 17 00:00:00 2001 From: hamza jazyri Date: Sun, 19 Feb 2023 15:58:52 +0100 Subject: [PATCH] docs(material/datepicker): avoid CalendarView switching add missing encapsulation to disable pointer-events for periodButtonLabel. fixes #24915 --- .../datepicker-views-selection-example.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components-examples/material/datepicker/datepicker-views-selection/datepicker-views-selection-example.ts b/src/components-examples/material/datepicker/datepicker-views-selection/datepicker-views-selection-example.ts index 6afb2a21a6df..b35360c89b25 100644 --- a/src/components-examples/material/datepicker/datepicker-views-selection/datepicker-views-selection-example.ts +++ b/src/components-examples/material/datepicker/datepicker-views-selection/datepicker-views-selection-example.ts @@ -1,4 +1,4 @@ -import {Component} from '@angular/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {FormControl} from '@angular/forms'; import {MomentDateAdapter, MAT_MOMENT_DATE_ADAPTER_OPTIONS} from '@angular/material-moment-adapter'; import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core'; @@ -45,6 +45,7 @@ export const MY_FORMATS = { {provide: MAT_DATE_FORMATS, useValue: MY_FORMATS}, ], + encapsulation: ViewEncapsulation.None, }) export class DatepickerViewsSelectionExample { date = new FormControl(moment());