I want to change the shape of selecting and hovering on any date to square instead of circle
It is quite tricky the first time. For the hover effect:
.mat-calendar-body-cell {
&:not(.mat-calendar-body-disabled) {
&:hover {
>.mat-calendar-body-cell-content {
&:not(.mat-calendar-body-selected) {
&:not(.mat-calendar-body-comparison-identical) {
// add your styles here
}
}
}
}
}
}
CSS:
.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover >
.mat-calendar-body-cell-content:not(.mat-calendar-body-
selected):not(.mat-calendar-body-comparison-identical) {
// your styles here
}
For the selected day:
.mat-calendar-body-selected {
// add your styles here
}
And in case you need it, for the circle that shows the day you are in:
.mat-calendar-body-today {
&:not(.mat-calendar-body-selected) {
&:not(.mat-calendar-body-comparison-identical) {
// add your styles here
}
}
}
CSS:
.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-
calendar-body-comparison-identical) {
// your styles here
}