ouical.js (bundled in js/vendor/ouical.js) and supports Google Calendar, Apple Calendar, Outlook, and Yahoo Calendar.
The createCalendar() call
The calendar widget is configured injs/scripts.js using the createCalendar() function provided by js/vendor/ouical.js:
js/scripts.js
#add-to-cal inside the RSVP success modal.
Field reference
The event title that appears in the guest’s calendar. Update this to your own names:
The event start date and time as a JavaScript
Date object. The format new Date('Nov 27, 2017 10:00') is human-readable and reliable across browsers. Update to your wedding start date:The event end date and time. Takes precedence over
duration if both are set. The example spans two days to encompass the full wedding weekend:The venue address shown in the calendar event. Update to your own venue:
A longer description included in the calendar event body. Good place for a contact name and phone number:
Supported calendar providers
Theouical.js library generates separate links for four calendar providers. Guests see all four options and can choose the one matching their calendar app:
| Provider | How it works |
|---|---|
| Google Calendar | Opens a pre-filled Google Calendar event creation URL |
| Apple Calendar | Downloads an .ics file that opens in Apple Calendar or any iCal-compatible app |
| Outlook | Downloads an .ics file compatible with Outlook |
| Yahoo Calendar | Opens a pre-filled Yahoo Calendar event creation URL |
ouical.js is loaded in index.html before the main scripts:
index.html
RSVP success modal
The#add-to-cal div lives inside the RSVP thank-you modal:
index.html
<h3> and <p> text to personalize the thank-you message. The #add-to-cal div is populated dynamically when the page loads via $('#add-to-cal').html(myCalendar).
The “Add to Calendar” widget appears only inside the thank-you modal, which is shown after a successful RSVP form submission. Guests who do not RSVP through the website will not see the calendar buttons. The modal is triggered in the RSVP form’s
.done callback:js/scripts.js
