Calendar tag reference

Quickstart

Put the following code in your dtml:

        <dtml-calendar>
          <dtml-var date fmt="%d">
        </dtml-calendar>

Phew! that was quick!

Show me your true colors

You can specify the color of the background:

        <dtml-calendar bgcolor="#cc99cc">
          <dtml-var date fmt="%d">
        </dtml-calendar>

Linking you, linking me

By now, you have probably worked out whatever that goes between the calendar tags get displayed in each cell.

The following example puts a link on dates less than 14 :

        <dtml-calendar bgcolor="#cc99cc">
          <dtml-if "_int(date.dd())<14">
            <a href="http://www.zope.org"><dtml-var date fmt="%d"></a>
          </dtml-else>
            <dtml-var date fmt="%d">
          </dtml-if>
        </dtml-calendar>

Getting rid of the toolbar

So the toolbar is a bit ugly, but you are no artist either. Let's turn the toolbar off:

        <dtml-calendar controls=no>
          <dtml-var date fmt="%d">
        </dtml-calendar>

Use text links instead of images in the toolbar

A trivial task with the calendar tag:

        <dtml-calendar images=no> 
          <dtml-var date fmt="%d">
        </dtml-calendar>

Mess with the calendar tag's brains

The weekdays attribute takes two digits, the first digit between 0 and 6, the second digit between 1 and 9. Kids, do try this at home:

        <dtml-calendar weekdays=37> 
          <dtml-var date fmt="%d">
        </dtml-calendar>

Notice that the week begins on Wednesday now? And try this too:

        <dtml-calendar weekdays=35> 
          <dtml-var date fmt="%d">
        </dtml-calendar>

No habla ingles?

Built-in internationalization:

        <dtml-calendar lang=es> 
          <dtml-var date fmt="%d">
        </dtml-calendar>

Other languages you can use are: ca, da, de, du, en es, fi, fr, it, ja, no, pt, zh_TW, ru.

Themes

At the moment there is only the "yy" theme:

        <dtml-calendar theme=yy>
          <dtml-var date fmt="%d">
        </dtml-calendar>