feat(MatCalendar): Allow to turn focus off on change inputs to MatCalendar #30635
Labels
feature
This issue represents a new feature or feature request rather than a bug or bug fix
needs triage
This issue needs to be triaged by the team
Feature Description
Add some option so that MatCalendar does not take focus when it's inputs are changed.
Use Case
Thank you for making a very beautiful calendar/date picker for material 🙂
I am using the calendar and dynamically deciding which dates are selectable or not from some backend service.
When the user changes month, it requests the available dates, and updates the myFilter observable which produces a new function, which causes MatCalendar to recheck all the shown dates to see if it should disable that date or not.
This works great, but the issue is that sometimes the data is updated by other things - not month change - that are on a different part of the screen. The available dates will update, the observable pushes a new filter function.
The problem is that this causes the MatCalendar to take focus, and scrolls my user from wherever they are on the screen, I cannot allow this but don't see a way to solve it without disabling the filter all-together.
The text was updated successfully, but these errors were encountered: