Code is replacing the dates in date fields, but that isn’t changing the BI webpage table filters

I am trying to write a javascript code to run in Power Automate, to change dates (variables) on a Power BI Report webpage. The date fields do reflect the dates from the code, however they do not seem to ‘work’ and the BI table does not filter accordingly.

I tried the following code, my expectation is to have it update the dates in in date fields in a way that the BI tables get filtered too.

function ExecuteScript() {
//sleep time expects milliseconds
function sleep (time) {
  return new Promise((resolve) => setTimeout(resolve, time));
}
// Usage of the sleep timer
sleep(100).then(() => {
//assign variables to access iframe elements
var iframe = document.getElementsByTagName('iframe')[0];
var fromdate = iframe.contentWindow.document.querySelectorAll('div input[type="text"]')[0];
var todate = iframe.contentWindow.document.querySelectorAll('div input[type="text"]')[1];
var plant = iframe.contentWindow.document.getElementsByTagName("span")[9];
//enter dates and choose plant
fromdate.value = '%fromdate%';
todate.value = '%todate%';
plant.click();
});
}
<input _ngcontent-tdb-c185="" autocomplete="off" type="text" class="item-fill ng-untouched ng-pristine ng-valid date-slicer-input enable-hover" id="700145b9-c237-22d2-f54c-a617efa32e18" placeholder="" aria-description="Enter date in M/d/yyyy format" aria-label="Start date. Available input range 11/8/2022 to 2/10/2024" style="color: rgb(37, 36, 35); text-decoration: none;">

These are the date fields