fullcalendar / fullcalendar-react

The official React Component for FullCalendar

Home Page:https://fullcalendar.io/docs/react

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I get the title of a calendar?

DhiaDjobbi opened this issue · comments

I want to get the title of a calendar and console.log it.

image

How can I access the View Object in FullCalendar V5
So I can get the title from it view.title
In the documentation there page there is this example:

var view = calendar.view;
alert("The view's title is " + view.title);

How can I do this in a react component ?

I am not spreading hate.. but Honestly the documentation IS SOOOOO LIMITED and does not have clear examples or does not explain ANYTHING...
Thank you in advance.

https://fullcalendar.io/docs/Calendar-view
https://fullcalendar.io/docs/view-object

Please refer to the support page and use Stack Overflow for help.

This explains how to get a reference to calendar in React:

https://fullcalendar.io/docs/react#calendar-api

This seems to be working:

fullCalendar.value?.getApi().getCurrentData().viewTitle