edit doc

Calendar::getDate

Returns a Date for the current date of the calendar.

calendar.getDate() -> Date

For month view, it will always be some time between the first and last day of the month. For week views, it will always be sometime between the first and last day of the week.

Example of displaying a calendar’s current date when a button is clicked:

document.getElementById('my-button').addEventListener('click', function() {
  var date = calendar.getDate();
  alert("The current date of the calendar is " + date.toISOString());
});