Mail Application Development Platform API Reference

Class Calendar

Open mail's calendar API

Methods

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'.

Sample Use:
<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 of calendarEvent are optional.
Here are the possible members:
title: String The event title
starts: Date The start date and time of the event
isoStart: String The start date and/or time of the event
ends: Date The date and time the event ends
isoEnd: String The date and/or time the event ends
location: String The location of the event
notes: String Notes
untimed: boolean Set to true if the event is untimed

Returns: int
An error code.


Copyright © 2009 Yahoo! Inc. All rights reserved.