Z.Calendar
Description
The Z.Calendar object is used to add calendar events to the user's calendar. When the add(...)
function is called the user is presented with an OS-provided dialog box for customizing the event before choosing to save it to their calendar or discard it.
This object is accessed using a global instance at Z.calendar
.
The add(...) page has examples of adding events to the calendar.
Z.Calendar uses JavaScript's standard Date object for representing dates and times. This Date object, somewhat bizarrely, uses zero-based numbers for months - i.e. January is 0, February is 1, etc. For more information see the Mozilla Developer Network Date article.
Time Zone
When adding an event to your calendar without a time zone, the event will be scheduled for the default time zone.
To include your timezone in the event, add the following string:
Z.calendar.add({
title: "Title",
start: new Date('Feb 20 2019 9:00:00 PST'),
end: new Date('Feb 20 2019 14:00:00 PST'),
location: "Location",
notes: "notes"
});
Provided by Z.Calendar
Enumerations
Frequency | Indicates how regularly a recurring event occurs. |
Month | The months of the year. |
WeekDay | The days of the week. |
Functions
add(...) | Displays a dialog that allows the user to add an entry to their calendar. |
Interfaces
Entry | An event entry to add to the calendar. |
EntryRecurrence | A set of options surrounding the recurrence of an event. |