Training and Development for Drupal

Date + Calendar Screencast (Drupal 6)

FAIL (the browser should render some flash content, not this).

(If you are looking for Date + Calendar instructions for Drupal 7, look here.)

If you like this screencast, you can show it by pitching in to a special fundraising effort. (And here's why.)

Here is a fast screencast covering the Date and Calendar modules for Drupal 6. This recipe illustrates one way to let your users post their own events (like parties, appointments, meetups, etc) that include date information stored in a field. Then you can see how to display these dates on a traditional calendar layout with all the events sorted into the correct days.

The modules doing the heavy work are the Date module (for use with CCK) and Calendar module (for use with Views). Something to note is that the Calendar module provides a number of default views that display a calendar-style layout. While you can simply enable the view called "Calendar" and call it done, this screencast instead demonstrates the two to three different steps one would take to build a calendar-style view from scratch. I chose to do it this way to help you better understand how the all the date and calendar parts fit together.

There is an entirely different approach to making dated nodes, which uses the Event module, but that is not covered in this screencast.

To make the best use of this screencast it would be awesome to have some prior exposure to the Views and CCK modules for Drupal 6. You should also have working knowledge of Drupal including the installation of contributed modules.

If you find this helpful, drop me a note. Also, if you find anything incorrect that I may have overlooked the please let me know so I can correct it.

Comments

Thanks, enjoyed the tutorial!

- johnc

I'm going batty. This all seems to work except for the calendar style (using dev version of calendar even). There's nothing showing on the calendar. It doesn't seem to be a problem with Views or with Date because the date-browser View returns the correct nodes with other format styles, just no calendar. I've tried this on two different Drupal installations with the same result. Is anyone else having this problem?

I just went through some date/calendar issues that sound like yours. I finally found the "date tools" on the admin menu. They allow you to set up a date-based content type and creates a calendar view for it. I never got it working the way that was outlined here.

good luck!

Enjoyed this tutorial. Liked the depth and style of it. Good job!

I just wanted to say THANKS! for this very helpful tuto

Concise and precise to the point. Thanks for putting together fundamental steps involved in creating calendar of events.

Very cool!

How can I insert regular events? Like always saturdays?

Greets Dennis

very nice, short, and informative.

However source links would be nice
CCK
VIEWS
CALENDAR
DATE
Optional (but recommended)
Advanced Help

perhaps adding some cck fields on video blog posts with required & optional links might be nice..

anyhow many thinks for contributing knowledge to the community..

these links were helpful. Thanks!

Sean,
thanks for this podcast. I'm new to Drupal or web stuff for that matter :o) and have become addicted, even if a 10min task takes me 2hours I have learned to enjoy this and with your podcasts my life is less frustrating. I second Daryl, I would love a podcast on how to remove the date and the mini calendar. anywayz..

thx!!!

Monica Schultz

To remove the date from a display you will need to understand how the Views module works. In short, navigate to the Views admin area, identify the view that produces the minicalendar block, click the name of the field in the "fields" sector and choose to remove it. Alternatively you can swap out that field for any other from the node. It's up to you. If this is greek to you then look up the screencast from Lullabot on using Views and CCK.

I'm thinking about adding a calendar to my drupal site - this is just what I needed, thanks!

Fantastic job, Sean!

Thanks so much for going into the kind of detail that we new users need. While I may not understand everything you did, exactly, you have provided me the inspiration to explore more, to learn the basics more solidly, and to craft my work more professionally as I develop projects using Drupal.

I needed this therapy more than I knew.

--Larry

Thank you so much! This was really a great help for me as I am still pretty new to Drupal. :-)

Sean,

What is your advice if I wanted to have three calendars on my site to promote events in different regions. The events will be posted by users and they would need an option to select which calendar the event should be posted on. Is that something taxonomy would take care of or do I need to do something else? Thanks for your help in advance.

Chris

Taxonomy would do it. You would be adding a taxonomy field to your dated content type that would determine the region. Then you would have EITHER three different calendar views each one using a different taxonomy term to filter the dates OR one calendar view with an exposed taxonomy filter so that users could select the region from a drop down.

You'll have to study up on views and taxonomy, its pretty easy once you wrap your head around it. Good luck.

Well done Sean and thank you for your fine efforts.

How i can use calendar module to view birthdays of users ?

Wow, that is tricky. For now, you'll probably have to study up on the "users-as-nodes" discussion and use one of the tactics of creating a single node per user to act as a user profile. People do this so they can use CCK and Views to build and display user profiles since the standard user is hard to customize.

There is a module called Content Profile for D6 that you can configure to make a node for each user, use CCK and Date to add date and other profile-like fields to it, and then use Views and Calendar to display dates from those user related nodes.

Sorry I couldn't give you a straight answer but once you start reading up on these you will see how large this territory is.

Can you make it more tricky? What if you had the ability to flag other users as 'friends' and only wanted to show your friends' birthdays in a calendar?

I'm fairly new to Drupal and wondering how you use dynamic content to select data for a view.

I follow above screencast, but Event CCK did not create for for me... kindly help me any one.

Thanks
- karthik

I've got the same problem. There is no content type "Event" after the installation. What happens?

I'm not using the Event module in this screencast. Can you be more specific?

I followed the screencast til 6:20. You are in the Content types and there are 3 types: Event, Page, Story.
I have no "Event" - Type.

I followed the screencast til 6:20. You are in the Content types and there are 3 types: Event, Page, Story.
I have no "Event" - Type.

Very clean tutorial ! Thanks for this.
I'll definitely need such date features on my site.
I am very (a few hours) new to drupal.. till now.. That rocks !
I'm bookmarking your website.

Well done - thanks very much for putting this together.

This was great. I finally figured out your last sentence - don't be a "menace"!! Had to watch it a million times. Great tutorial.
peter

I really understood how to build a calendar with the date + calendar module. I was successful my first time using Drupal modules. I am using these modules to allow the user to also allow the user to schedule their own meetings, group events, etc. I was not completely clear how to do this with these modules.

Thanks for your great tutorial!

Hi Sean,
Nice tutorial. Looking forward to watching the others.

Linea Rowe
(Acquia)

Thanks for dropping in, Linea.

Thank you very much for this helpful tutorial!

Thank you very much, Sean!
It was really usefull!

Viktor.

Nice, Thanks A LOT!

Excellent!!!

Great tutorial and thanks for sharing. I did find that I do not have an event already created, so I will need to go back and get up to snuff. Thanks again.

Very nice screencast. Makes me want to implement a calendar.

Go raibh maith agat, Sean

Rosemary C

Hm. all of your screencasts end after about a minute and icons show: more or again. Any ideas why?

Extremely helpful .. thanks Sean :-)

I am really new at Drupal but, Sean, this was really helpful! This is big for my family website and very helpful.

You are awesome and keep it up.

Great tutorial! Thanks so much!

I was very nervous to use views for anything, even using a tutorial, since it really hurt my head the last time I tried! I know how important views are for using drupal successfully and efficiently but was terrified to try. Your tutorial made things very easy and helped me to feel more comfortable not only with setting up my calendar quickly and efficiently but also with the views module itself.

Thanks!!

Hi Sean,

After following all of the steps I am getting an error when I try to change date brower view. The preview will not display and I get the message "An error occurred at /admin/build/views/ajax/preview/date_brower". I've reinstalled all of the components and I still have the issue.

Any ideas?

Hi,

I am new to drupal.
I followed this step by step but it does not seem to work the calender is showing up empty.

I updating the arguments as suggested

added fields

and changed the style to calendar

added some dummy events by creating a new content type with date field.

am i missing something...

thanks

Merci beaucoup Sean !!!

Gracias Sean!

Great screencast. Thank You a lot!.

This is a very good lesson....
I loved it and at the same time I made use out of it to learn how to work with calendar and date....

Thanks once again and keep the good work going for all newbiz like me....

regards
Vivek Sonavane

THANKS so much. I was about to throw my computer out my window. You're a savior!!

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Most Recent Screencast

See video

Support the Association