Hi. Is there a way to query calendar element to retrieve the current calend

Hi. Is there a way to query calendar element to retrieve the current calendarView? I couldn’t find such listener or getter. The calendar according to the ViewAPI (https://fullcalendar.io/docs/Calendar-view) has such method but together with callJsFunction or executeJs I couldn’t make it work. Can you, please, suggest? Vaadin 14.2 and FC 2.2.4.
Thank you.

You could do it this way:

calendar.getElement()
    .executeJs("return this.getCalendar().view.type")
    .then(x -> {
        System.out.println(x instanceof JsonString ? x.asString() : "--");
    });

In the upcoming 2.3.0 you can alternatively register a DatesRenderedEvent or ViewSkeletonRendered event listener and obtain the view’s name via event.getName().