Javascript Calendar Integration

Written by Paulo Vale on Monday, January 07, 2008

One of the good things about APEX is that we're not limited to the buit-in features. There are hundreds of examples of free code you can find with the help of Mr. Google :)

Today I'll show one of these examples. A small javascript calendar that you can integrate in you APEX applications. Click here to see it working.


I've found this simple but great small javascript calendar at http://calendar.swazz.org/ . Click here to download the latest version.

To install the script:

1- Copy the calendar.js script into a filesystem directory or just upload it as a static file under Shared Components.

2- Include the following somewhere in the HTML of your page (Header section of you page or directely in page template if you want the calendar available in all application pages). Substitute the path of the file accordingly making sure it points to the correct location of the calendar.js file.



3. Create a Text Item in your page and open the item properties page. Add to the the code:
onfocus="this.select();lcs(this)"
onclick="event.cancelBubble=true;this.select();lcs(this)"

4. Run the page and click the Text Item.

There is another interesting project for tooltips from the same author of the calendar script. If I manage some free time i'll blog about it later.

Related Posts by Categories



Widget by Hoctro | Jack Book
  1. 3 comments: Responses to “ Javascript Calendar Integration ”

  2. By Anonymous on November 28, 2008 at 12:37 PM

    I like it, nice and simple. Thank you for this tip!
    Do you know how to show the images associated with the calendar? What I did now was edit the calendar.js file to this:
    <img src="arrowrightmonth.gif" alt=">">
    So it kinda looks like a "next month" "previous month" thing

  3. By Paulo Vale on November 28, 2008 at 2:36 PM

    Alex,
    This example uses an external file to load the javascript. In this case you can't use Apex substitution strings like #WORKSPACE_IMAGES#.

    The solution to go around this problem would be putting your images in your server filesystem and calling them with the absolute path.

  4. By Daniel Vega on June 7, 2009 at 2:40 PM

    Hi Paulo
    The links you provided for download calendar source are broken.
    Can you update them or send them to my mail? (dvega1970@hotmail.com)