import { Component , ViewEncapsulation } from '@angular/core' ; title @ Component ( { selector : 'datepicker-date-class-example' , templateUrl : 'datepicker-date-class-example.html' , styleUrls : [ 'datepicker-date-class-example.css' ] , encapsulation : ViewEncapsulation . None , } ) export class DatepickerDateClassExample { dateClass = ( d ) => { const date = d . getDate ( ) ; return ( date === 1 || date === 20 ) ? 'example-custom-date-class' : undefined ; } ; }