I am developing a Calendar application and facing an issue with selecting and displaying intervals of months. When I limit the display to a maximum of 3 months, it appears like this
https://i.sstatic.net/F3jBA.png
... but when I try to display more than 3 months, it ends up looking like that.
https://i.sstatic.net/YUbI8.png
I have implemented css flex to make sure the calendars fit nicely within the browser window. However, I'm uncertain if I need to develop an algorithm for this purpose. Can anyone guide me on this?
Below is the snippet from my HTML file:
<div class="container-calendar1">
<ca-month-calendar *ngFor="let selectedMonth of selectedMonths" [month]="selectedMonth">
</ca-month-calendar>
<ca-month-calendar>
</ca-month-calendar>
</div>
And here's how I've defined the styling in my CSS file:
.container-calendar1{
display: flex;
flex: 2;
}
month-calendar {
margin:20px;
}