From 22377de3418e7293b0792d3fc6fd7572f7436b34 Mon Sep 17 00:00:00 2001 From: Hamza jayri <71387563+hamzajazyri@users.noreply.github.com> Date: Tue, 21 Feb 2023 09:06:06 +0100 Subject: [PATCH] docs(material/datepicker): avoid CalendarView switching (#26652) add missing encapsulation to disable pointer-events for periodButtonLabel. fixes #24915 (cherry picked from commit ab6b4bfd793737d770d203efdb757572094ac2fa) --- .../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());