addEvent
int
addEvent
(
eventParms
)
Opens the UI to add an event to the user's calendar.
Passing eventParms is optional, as is every member of that object. Any values
present are used to initialize the UI presented to the user.
Only pass one of starts and isoStart. Likewise, only pass one of ends and
isoEnd. These are alternative representations of the start and end time.
Using an alternative representation may be preferrable to using a JavaScript Date object because
you must set the time and date for a JavaScript Date object.
If a start time is given (either in starts or isoStart), no end time is given,
and 'untimed' isn't set, 'untimed' will be set to 'true'.
<script>
...
evt = {
title: "Dentist Appt",
location: "dentist's office",
notes: "it's gonna hurt...",
starts: new Date(2008, 9, 22, 9, 00),
ends: new Date(2008, 9, 22, 9, 30)
};
openmail.Calendar.addEvent(evt);
...
</script>
- Parameters:
-
eventParms < calendarEvent >Optional object used to pre-populate the UI.
All members ofcalendarEventare optional.
Here are the possible members:
title: StringThe event title
starts: DateThe start date and time of the event
isoStart: StringThe start date and/or time of the event
ends: DateThe date and time the event ends
isoEnd: StringThe date and/or time the event ends
location: StringThe location of the event
notes: StringNotes
untimed: booleanSet to true if the event is untimed
- Returns:
int - An error code.
