Skip to content

Commit

Permalink
docs(material/datepicker): avoid CalendarView switching
Browse files Browse the repository at this point in the history
add missing encapsulation  to disable pointer-events for periodButtonLabel.

fixes angular#24915
  • Loading branch information
hamzajazyri committed Feb 19, 2023
1 parent 3c53deb commit 41bcafa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 41bcafa

Please sign in to comment.