I'm building an ionic app using angular.
I have a page with HTML and SCSS files. I'm using some ng-bootstrap components on this page (datePicker).
I can change the style of class inside the datePicker by using this code.
::ng-deep .ngb-dp-months {
background: red;
}
All fine to this point.
now I want to change the width of this class .ngb-dp-day on ngOnInit()
I tried this code but it's not working, try to fix it for me here:
See: https://stackblitz.com/edit/angular-ciow7q-n7rums
//I need to fix this funtions
changeDayElementWidth() {
this.widthPerDay = (window.innerWidth) / 7;
this.daysElements = document.getElementsByClassName("ngb-dp-day") as HTMLCollectionOf<HTMLElement>;
console.log(this.daysElements);
for (var i in this.daysElements) {
this.daysElements[i].style.width = this.widthPerDay + 'px';
}
}
The Question is:
how to change the CSS of the element ::ng-deep .ngb-dp-day ?
See: https://stackblitz.com/edit/angular-ciow7q-n7rums
Please Help me.