You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(MatCalendar): @Input("startAt ") is not referenced for changes #25293
There is a workaround with "activeDate", but the problem is it makes a bit heavy on developers to implement programmatic month change (as it it not useable through templates). using startAt would make ours lives much easier when it comes to changing month view.
Reproduction
Steps to reproduce:
Create a component with a MatCalendar
set mat-calendar "startAt" attribute in template and bind it to a property in your component (startAt) for example.
change programmaticaly the startAt to another month
Nothing happens (and this is a problem)
Expected Behavior
startAt updates should be referenced for changeDetection and trigger a view update.
Actual Behavior
Changing startAt value won't trigger change detection.
A workaround is changing the "activeDate", that is not referenced as an Input, therefore developers will have a hard time finding it.
Most people are actualy using internal functions like "calendar.monthView._init()" and stuff like that...
Since "startAt" is for the date that the calendar opens to initially, there is no requirement that changing startAt after the calendar opens should have an effect. I'll convert this to a discussion so more developers could chime in on how to implement programmatic month change. perhaps there could be a better way to do that.
Activity
zarend commentedon Jul 26, 2022
Hello @hhsissi ,
Since "startAt" is for the date that the calendar opens to initially, there is no requirement that changing startAt after the calendar opens should have an effect. I'll convert this to a discussion so more developers could chime in on how to implement programmatic month change. perhaps there could be a better way to do that.
-Zach