Revision as of 15:33, 2 May 2008 by Forum Nokia KB (Talk | contribs)

Archived:Calendar for Symbian Web Runtime

From Nokia Developer Wiki
Jump to: navigation, search


ID CS000942 Creation date May 2, 2008
Platform S60 3rd Edition, FP2 Tested on devices  
Category S60 Web Runtime Subcategory  
APIs   Classes  


This example Javascript code is intended for re-use and incorporation into larger projects.


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 Forum Nokia Web site.

Popup calendar demo.jpg

Example application


93 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.