Show TOC

Function documentationiCalendar Events and Methods Locate this document in the navigation structure

 

You can use event parameters, which allow JavaScript functions to be associated with date selections, with your calendars. For more information about calendars, see iCalendar.

These events are listed in the following table:

Event

Provides the name of the JavaScript function that is called when

CreationEvent

The applet is initialized on a Web page for the first time

SelectionEvent

The user selects a value in the applet

DoubleClickEvent

The user double-clicks a cell in the calendar

Common methods used with calendars are listed in the following table:

Method

Use

void setDate(String dateString, String dateFormat)

Sets the date by providing a date/time value string and a parameter that describes the format so that it can be parsed and converted

String getDateAsString(String dateFormat)

Returns the selected date in the specified format

void setToCurrentTime()

Sets the calendar to the date and time from the client Web browser

public void setMonth(int mn)

Sets the month to the indicated value (1-12)

public void setYear(int yr)

Sets the year to the indicated value