Programaticaly trigger loading of vaadin-date-picker-overlay before user tries to open DatePicker calendar

Is it possible to programaticaly trigger loading of date pickers calendar (<vaadin-date-picker-overlay> and <vaadin-date-picker-overlay-content>) before user opens it?

We want to style date cells in the overlay but the overlay does not exist in the DOM until user opens it for the first time.

Currently I use DatePicker::addOpenedChangeListener to execute JS that syles and disables some of the date cells. But it is possible to see the change of the styles for a split second after opening the calendar or worse - it does not style them at all. I belive the JS executes faster than the overlay appears in the DOM tree.

I would like to style the date cells before user opens the calendar.

I don’t think it’s supported. The closest thing I can think of is the newly available PR created for 24.4 that allows disabling specific dates - this might also be useable for your styling use-case feat(date-picker): Add isDateDisabled functionality by yuriy-fix · Pull Request #7075 · vaadin/web-components · GitHub

Unfortunately we are currently using Vaadin 24.3.7.
I wonder if this is achievable using MutationObserver.

Yes, rendering the overlay content before first opening isn’t supported. It was intentionally implemented this way to avoid performance issues when having many date-pickers on the page. As mentioned above, it’s recommended to update to 24.4 and use isDateDisabled API.

How can I call isDateDisabled from java? The flow DatePicker class does not expose an API for this js function.