Last updated September 27, 2013. Created by wusel on March 11, 2012.
Edited by colan, scalico, wmostrey. Log in to edit this page.

This Cookbook shows, how you can prepare an event-calendar for Drupal 7, using the new method to create new calendars from a template.

Cookbook:

Step 1: Before we start

  1. If not enabled, download the modules Ctools (http://drupal.org/project/ctools), Calendar (http://drupal.org/project/calendar), Date (http://drupal.org/project/date) and Views (http://drupal.org/project/views) and install them to your modules-path like sites/all/modules.
    Visit 'http://example.com/admin/modules' and enable the modules "Calendar", "Date" and "Views UI". After Clicking on "Save configuration" click "Continue" to enable all required dependencies too.
  2. Visit 'http://example.com/admin/structure/types' and click on "Add content type".
    Name ='Event', Description like 'An event with a title, date/time information and a body for storing details.'. Then click on "Save and add fields".
  3. In line "Add new field" select Type of data to store = "Date (ISO format)", Label ="Event-Date", Field name = "field_event_date", Form element to edit the data = "Text field", then click on "Save".
  4. On the page "Field settings": set "Collect an end date" to yes and "Time zone handling" to "No time zone conversion" [1] and then click on "Save field settings".
  5. On the page "Event settings" set "Required field" to yes and then click on "Save settings".
  6. Only if you want:
    Visit 'http://example.com/admin/structure/types/manage/event/display': on "Custom display settings" set all options (like "Teaser") to no and then click on "Save".
  7. Visit 'http://example.com/admin/structure/views/add-template' and add "Calendar - A calendar view of the 'field_event_date' field in the 'node' base table.". On "/admin/structure/views/view/calendar/edit" click on "Save".
  8. Visit 'http://example.com/admin/config/date/calendar' and do the Calendar Administration.
  9. Add a second menu-entry if you like, e.g.: Menu link title = "Event-Calendar", Path = "calendar-node-field-event-date".
  10. Set the calendar-blocks for "View: Calendar" visible as you like on 'http://example.com/admin/structure/block'.

Step 2: Add one or more events

To test: Click on "Add content" in the Navigation-menu, select "Event":
Title = "My first event", Body like "This is the first event", change nothing, Click on "Save".
Later you have to enter/import the event-time in the timezone of the location of the event. [1]

Step 3: View the event-calendar

Visit 'http://example.com/calendar-node-field-event-date'.

Notes:

[1]: This is the recommended setting, which later cannot be changed, without deleting all events prior to that! If you choose the "Time zone handling" to "No time zone conversion", then there is no changing of the time of the event between adding/importing and viewing, neither in summertime nor in wintertime. You have to enter/import the event-time in the timezone of the location of the event (like the flight-time on an airport, this is always local time/local timezone. The difference between the time of departure and arrival is different from the flighttime, if the timezones of the two airports are different).

[2]: If you use the module Feeds (http://drupal.org/project/feeds) to import events, please patch Feeds until issue http://drupal.org/node/722740#comment-5373838 is patched to the module.

[3]: If you update the calendar-module it may be necessary to delete the old calendar-view and create a new calendar-view using this Cookbook.

 

Good luck!

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

woohoo! this is just what the doctor ordered!

thanx a lot wusel!

I was about to go crazy with my own useless version of event calendar :P

Thanks, and i mean it.

nico

PIÑA&POLLO

do not know if it's the place to talk about it.
but I have the following problem:
Calendar does not advance to the next month
When I click the next or previous month link

links like this
http://mysite.com/calendar-node-field-data/month/2012-06

do not move the calendar

any ideas?

Visit 'http://example.com/admin/config/date/calendar' and do the Calendar Administration.
If you have updated the calendar-module it may be necessary to delete the old calendar-view and create a new calendar-view using this Cookbook

Wusel

As a Drupal newbie I found your instructions clear, straightforward, and easy to follow.

Thanks very much :)

+++
Matthew Bourne
Independent Technical Consultant

This was so helpful.
I really appreciate it.

Thanks U!

Thanks wusel!
The key seemed to be using the Views Calendar template; when I tried to set up the contextual filter myself (not using the template) I always got errors on the date field, whether the event date field I created was type 'date' or 'date ISO'...saying 'group field required'. I don't know if it is b/c the template uses 'OR' not 'AND'
Again, thank you!

zorgalina

Simple and handy!!!

Hi all, i just created my calendar nicely, everything is working just fine, however i have a rather strange request/ question to ask. In the calendar the events can occur in more than one facilities (for example meeting in the board room and then lunch in the cafeteria etc) but all of these are created under one event in which i have added a node reference of more than one options to be able to be selected.

However this leads to the event appearing in the calendar as many times as the nodes selected in the node reference. Is there a way to group events by name the same way as in a regular view?

Thanks

Tolis

How would you show all displays (month, week, day. year) in one block for the user to select how they want to view the calendar? Most calendars like google etc. let you, the viewer, choose week, month, day view, but i couldn't figure out how to do that. Thanks!

Had to delete view and re-create. It shows up now.

Yes, look at https://drupal.org/node/1477602#note3

Good luck!

Wusel

Subscribing