Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="calendar-container"></div>
- <style>
- // Source - https://stackoverflow.com/a/32511510
- // Posted by sheive, modified by community. See post 'Timeline' for change history
- // Retrieved 2026-05-08, License - CC BY-SA 4.0
- // Instructions
- // You must have your calendar set to PUBLIC and ideally, 'See All Event Details' so your viewers can see the names of the time blocks
- // Scroll down to 'Integrate Calendar'
- // Copy 'Public Url to this Calendar'
- // It will look like this 'https://calendar.google.com/calendar/embed?src=_______&ctz=America%2FLos_Angeles'
- // The '____' is your Calendar ID, it might be your email or a string of numbers/letters, that is the only part you need
- #calendar-container {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 100%;
- }
- iframe {
- max-width: 100%;
- border: 0;
- }
- </style>
- <script type="text/javascript">
- const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
- const html = `<iframe src="https://calendar.google.com/calendar/embed?mode=week&src=________&ctz=${timezone}" width="1000" height="800" frameborder="0" scrolling="no"></iframe>`;
- document.getElementById('calendar-container').innerHTML = html;
- </script>
Advertisement
Add Comment
Please, Sign In to add comment