Need to Dynamically Change Headings in Fiori List report Developed Using Fiori Elements

I do have a Fiori list report developed using Fiori Elements. I need to dynamically change the column headings.
I have a filter called Period which can be selected as Monthly or Weekly.
When the user has selected the Monthly option, the columns should have headings for next four months ,
like
03/2023 04/2023 05/2023 06/2023
When the user has selected the Weekly option, the columns should have headings for next four periods ,
like

Calender 09 Calender 10 Calender 11 Calender 12 .
How can i achieve the same using javascript code in the front end ? especially for the one which developed with fiori elements.

@Fiori Elements @Fiori @UI5 @Javascript

Dynamic Column in List report developed using Fiori Elements