Get Time Context From Dashboard

Is there a way to get the time context of the dashboard being displayed actively on the page.
Like if the user clicks back to February and then clicks the button, I can get that current date from the dashboard and use it in my dashboard report.

You can potentially access the value using JavaScript directly from the DOM element that’s displaying the date:

document.getElementById('dashboard-time-dropdown').textContent;
// Aug 15, 2024 10:52:00
1 Like

is there documentation for niche stuff like that? all of the elementIDs of a dashboard?

There is not. I found it by using the browser’s developer tools. I believe you’re using CPF, which places the dashboard in an iFrame. I still think it’s possible, but querying the DOM of an iFrame requires some extra steps.

1 Like