Archived:Calendar for Symbian Web Runtime
Article Metadata
Code Example
Compatibility
Article
Purpose
This example Javascript code is intended for re-use and incorporation into larger projects.
Overview
Calendar is a graphical user interface library, written in JavaScript language and designed for the S60 Web Runtime platform (WRT). The library can be used to create a popup calendar window for selecting a date.
The date format returned by the Calendar object is [dd/mm/yyyy] regardless of the system locale.
Calendar can be controlled in two ways, either by using the cursor mode or the tabbed mode. When a calendar object is created in tabbed mode, it is controlled by the "keypress" event of the five-way navigation key (on S60 devices) and therefore requires the browsing mode of a widget to be set to tabbed mode (as opposed to cursor mode). Calendar, however, does not enforce this requirement automatically. Widgets that use the library then need to set the browsing mode accordingly. When a calendar object is created in cursor mode, a widget can easily use the calendar with other UI components that may require the cursor mode. However, browsing previous and next month with the cursor mode is not as convenient as in the tabbed mode.
An external file named LocalizedCalendar.js, where the localized month and weekday texts are defined, is required with the calendar object. See localization implementation in the demo widget.
For more information about localization, refer to the WRT API reference section of the Web Developer’s Library published on the Nokia Developer website.


