JavaScript: How to display a week of dates at a time

I am working on a FrontLoops challenge where the page displays the current week of dates. Clicking on the prev button should display the previous week of dates and clicking the next button should display the next week of dates. Currently, my code automatically puts the current date in the container for Sunday no matter what day it is. I'm still fairly new to working with date and time in JavaScript, so I would appreciate any help/direction in making this functional.

https://codepen.io/savvystrider/pen/rNowMbz
Was this page helpful?