I’m working on a web application where users can select different team members and view their availability through embedded Calendly calendars. The challenge I’m facing is that when a user switches between different people, I need to update the calendar widget to show the new person’s schedule.
Currently, I have this HTML structure for the calendar widget:
<div class="calendly-embed-container" data-calendly-url="https://calendly.com/example-user"></div>
When someone selects a different person from a dropdown menu, I want to modify the data-calendly-url
attribute using JavaScript and force the widget to refresh with the new calendar data. The problem is that simply changing the attribute value doesn’t automatically reload the calendar view.
What’s the proper way to programmatically change the URL parameter and trigger a re-render of the Calendly widget?