mattlewis92 / angular-calendar

A flexible calendar component for angular 15.0+ that can display events on a month, week or day view.
https://mattlewis-github.com/angular-calendar/
MIT License
2.71k stars 863 forks source link

Active day not opening after ng-build #1631

Open paulomacaneiro opened 1 year ago

paulomacaneiro commented 1 year ago

i've put angular calendar on my client system and its working perfectly on my ng serve, but when i build with ng-build the current view date on month view does not open, does not matter if it has events or not (i set the active day is open to true by default and set the view date to the day o clicked on the month view, as documentation shows). the view date is defined correctly when i clicked and the active day is open is true (checked on the console) and it is still not working everything else seems to be working, except this (weekview, day view, actions work when you access then by the other vies, etc.). ` <mwl-calendar-month-view *ngSwitchCase="CalendarView.Month" [viewDate]="viewDate" [events]="events" [refresh]="refresh" [activeDayIsOpen]="activeDayIsOpen" (dayClicked)="dayClicked($event.day)" (eventClicked)="handleEvent('Clicked', $event.event)" (eventTimesChanged)="eventTimesChanged($event)" (eventTimesChanged)="eventDropped($event)" (beforeViewRender)="beforeMonthViewRender($event)" [locale]="locale" [cellTemplate]="customCellTemplate" [eventActionsTemplate]="eventActionsTemplate"

dayClicked({ date, events }: { date: Date; events: CalendarEvent[] }): void { if (isSameMonth(date, this.viewDate)) { this.activeDayIsOpen = true; this.viewDate = date; this.activeDay = this.viewDate; } } ` Screenshots

Versions

matts-bot[bot] commented 1 year ago

Thanks so much for opening an issue! If you'd like to support this project, then please consider sponsoring me