Installing Calendar 2.x for Drupal 6

Last updated on
30 April 2025

OBJECTIVE
In this handbook we will install and configure the Calendar module 2.x for Drupal 6.x. And use a calendar of upcoming events as an example.
rel="nofollow">Only local images are allowed. width="150px">

NOTE
This handbook is for absolute beginners. If you consider yourself an advanced user find the README.txt file that comes with the module. Or create a new handbook for advance users.

REQUIREMENTS
We assume that the following are already installed and configured properly.

  • Drupal 6.x
  • Calendar module version 2.2 or more recent.
  • Views
  • Date API (packaged with the Date module)

INSTALLING

  1. To install the module copy the 'calendar' folder to your sites/all/modules directory.
  2. Go to admin/build/modules. Enable the module.
    Read more about installing modules at http://drupal.org/node/70151

CONFIGURING AND USING

  1. Go to admin/settings/date-time/formats

    Under Date formats section. Set the 3 date formats to match your needs.

    Click on Save configuration button.

  2. Go to admin/settings/date-time

    Set the Default time zone: field.

    Leave other setting to their default.

    Click on Save configuration button.

  3. You must make a custom ‘event’ content type using CCK. To do so go to admin/content/types/add
  4. Under Identification section fill the following fields. Without the “ ”.
    Name = “Group Event”
    Type = “event”
    Description = “Create a new event to appear on the sites calendar of upcoming events”
  5. Under Submission form settings section fill the following fields. Note that those settings are largely a matter of site needs and personal preference
    Title = “Event”
    Body = “Details” 
  6. Under Workflow settings section decide to best fit your site. It is worth considering unchecking “Promoted to front page” if you expect to have numerous small events posted.
  7. Under Comment settings section make decisions which are appropriate for your site.
  8. Click on Save content type button
  9. On the next screen click on the manage fields link next to your new content type. Note: In this example this screen can be found at admin/content/node-type/event/fields
  10. Add a new field with the following values. Feel free to modify to match your needs.
    Label = “Date”
    Field name = “date”
    Type of data to store = “Date”
    Form element to edit the data (Widget type) = “Select List”

    Note: There is some debate over the correct Form element to edit the data (Widget type). The widget type dictates the input UI and is really a matter of preference. It’s easy to change after the fact so try them all and see what you like best.

  11. Click on Save button
  12. On the next page under Group event settings section. Leave the Default value field to Blank.

    Set the Default value: field to Now.
    Note: End user can easily change this value when filling the form.

    Set the Input format: field to a format that match your needs. In my case May 12 2010 - 1:00:00pm

    Under Global settings section. Check Required option.

    Set the Set the To Date: field to Optional.

    Leave all other options to their default settings.

  13. Click on Save field settings button.
  14. Note: This is optional but on the next page you can of course add any number of additional fields to your event content type at this point using CCK. I've added location and contact information for my application and tied those to weather and profiles which is kind of cool (but way beyond this little write up) and testament to how amazing and powerful Drupal really is :)
  15. We are now going to create a first event. To do so go to node/add In this example click on Group event link.
  16. Fill out the form for your event. In this example we set a From date and a To date
  17. Click on Save button.
  18. In the following steps we will configure your calendar view.
    Go to admin/build/views
  19. Click on Enable link located on the right side of the calendar view item.
  20. Click on Edit link located on the right side of the calendar view item.
  21. The next screen is the view edit screen. With the Defaults view already selected. Click on below screenshot to clarify.
    rel="nofollow">Only local images are allowed. width="150px">
    Note: Many types of calendar views are available. Such as Calendar page, Calendar block, etc. But first we will just work with the Defaults view to start.
  22. In the Fields panel. Click on the + button to add a field.
    rel="nofollow">Only local images are allowed. width="150px">
    Scroll down the list of filters. Then check Content: Date (field_date) - From date option.

    Click on Add button.

    On the next screen leave all options to their default settings. Then click on Update button.

  23. Still in the Fields panel. Click on the Node: Updated date link.

    Click on the Remove button.

    Click on Save button.

  24. On the next screen leave all options to their default settings. Then click on Update button.

  25. In the Arguments panel. Click on Date: Date (node) link.
    rel="nofollow">

    Uncheck Node: Update date option.

    Check Content: Date (field_date) - From date Note: This set the start time of your event instead of the node update time as the argument for the view.

  26. Click on Update button.
  27. On the Filters panel click the + button to add a new filter.

    Scroll down the list of filters. Then check Node: Type option.

    Click on Add button.

    On the following screen leave Operator to Is one of.

    Then check Group events option. This will limit your calendar to only the Group events content type.

    Click on Update button.

  28. On the Sort criteria panel click the + to add a new criteria.

    Scroll down the list of filters. Then check Content: Date (field_date) - From date option.

    Click on Add button.

  29. On the next screen leave default settings to Ascending.

    Then click on Update button.

  30. Click on Save button to save all your edits.
  31. To test click on View "Calendar page" link.
    rel="nofollow">Only local images are allowed. width="150px">
  32. That's it. You have successfully install and configure the Calendar module 2.x for Drupal 6.x
    rel="nofollow">
  33. Note that this handbook will at least get you to a working calendar of coming events for your site. Obviously you’ve got a ton of configuration options to play with form here.

    This is a very powerful package. While it's not hard to setup it's got a lot of steps and many opportunities to go wrong. The key here is to set the argument / sort / filter bit of views configuration. This combination of modules seems to want to create a calendar widget for digging into the archives by default but it is easy enough to have it do otherwise.

SOURCES
http://drupal.org/node/326061#comment-1077193
http://www.drupaltherapy.com/node/76

Help improve this page

Page status: Not set

You can: