add(...)
add(val: CalendarEntry): void;
Displays a dialog that allows the user to add an entry to their calendar.
Parameters
Parameter | Type | Description |
---|---|---|
val | Entry | The calendar entry. |
Examples
Single Event
Z.calendar.add({
title: "Zappar's 10-year Anniversary Party",
start: new Date(2021, 3, 1, 19, 0, 0),
end: new Date(2021, 3, 2, 2, 0, 0),
location: "London",
notes: "BYOB"
});
Recurring Event
Z.calendar.add({
title: "Cassini Launch Anniversary",
start: new Date(1997, 9, 15, 4, 43), // 4:43am October 15th 1997
end: new Date(1997, 9, 15, 5, 43), // an hour later
recurrence: {
frequency: Z.Calendar.Frequency.yearly,
end: new Date(2017, 8, 15) // when to end the recurring event
}
});