i'm very excited about dinging event and using date/calendar/views/cck to implement a more flexible calendaring system - but i've already run into what seems like a basic issue that i can't figure out.

situation: created a content type called event with options: set date/time (todate) set end date/time (todate2 i believe) and optional repeat elements (this has zero to do with that last bit)

i've successfully modified the default calendar to filter by node type: event (my new content type which uses date/cck and so on)

when viewing the calendar, it is looking at the date of the node's creation, but i would like it to reference only:

date of event (the start date entered in first date field)
other event days (either end date if not same day, or 'other days' if repeating)

...basically want it to reference only the cck date fields and not the nid creation date itself...

is there a view already written for this (module or otherwise) that i might review, clone, import or otherwise modify to reflect my own installation?

thanks in advance for any assistance.

Comments

KarenS’s picture

Status: Active » Fixed

You might read through the documentation at http://drupal.org/node/262062.

You start with the default Calendar view. You can put any kind of Views date field into a calendar and I have no way of knowing which one you want, so the default view uses the node creation date, a date everyone will have. You can change the date field used in the Date argument to whatever field you want to use instead.

zilla’s picture

thanks karens - i've actually read through a bit of it, tried to click on that date:date preset (in default) and change it to the 'todate' that's coming from cck date but it doesn't modify the output at all, instead shows a bunch of text (the query) and up in the actual view layout area (that nifty java input area) instead of showing date:date it shows some non-highlighted black text with my own updated query...

fortunately, whenever it screws up i simply revert to the default and it's all fine again ;) ...but i'd love to know if anybody has actually written a modified calendar view that might be imported for the very common cck configuration in which an event starts on a certain date and ends on a certain date (eg if todate1 and todate2 are spread over several days or inherit options from 'repeat')

basically a view that replicates the default fields of event module, but as calls to the date cck fields now being used in a view exposed to the calendar view....

if i were to post some screenshots of what i'm talking about (the options i'm picking, or the way date:date looks after) do you think you may have some gut reactions to something i'm doing wrong (i have a feeling it may be something really obvious that i'm overlooking because i'm not a huge views user beyond the one-click enabled options)

zilla’s picture

sorry, came back to edit/add while other screen is open on my site

default date:date argument is 'node changed' (so any change) - i click it and then down in the checkboxes list below granularity, it's already checked where it offers "Node: updated date" and so i uncheck that and instead check: Content: Date (field_tododate value) - as well as: Content: Date (field_tododate value2) - these are (if i'm correct) the 'to and from' dates that cck date is putting into my custom event type (the only ones i've created with date, so can't imagine what else they are...

in preview i see a buncha code (query) with note that this result has no path

i switch to 'month view' for preview and now i see the calendar with one event on every day (and it's not supposed to do that!) BUT something is working because even though the event shows for wrong number of days, it *does* start on the correct date!

now i go back and change method from "OR" to "AND" but no effect...what other options exist for such an argument? i see only those two date fields that i've created on the list (up above) - also tried to change "distinct" to 'yes' (won't seem to save, also doesn't appear to work)

KarenS’s picture

You almost had it right -- uncheck node:changed and check the from date. You don't need both the from and to date and you don't need to make any changes to the OR or AND settings.

Then you need to decide exactly what you want to display -- you can show some fields, like the node title and date, or you can show the node teaser, or whatever. It will display whatever fields you put into the 'Fields' section.

Don't worry about the preview -- it's confusing on the calendar because there are lots of different displays and if you pick the wrong one it will look odd. Once you have set up all the fields the way you want *and* saved the view, go to the calendar path, which is /calendar/ if you haven't changed it, and you should see the finished calendar.

If you haven't used Views much, you might want to try out other simple views until you get comfortable with the way Views works. The Calendar is more complicated than some views.

zilla’s picture

you are awesome. marry me.

it's working like a charm right now - the only thing that freaks it out is the 'repeat' options area - while that would be nice to have, it's not a must-have and instead i've simply set up the from/to box as "unlimited" so that if the same event happens more than once (like a team practice schedule with identical details but diff times/days over five weeks), the individual can hit 'add another' and after testing it out, it works perfectly..

are there known issues with the 'repeat' options? it basically worked but wouldn't respect an excluded date and in the first pass it also threw the event up over and over before finally calming down (removed the freaky event and created some new test ones)

to be honest, the options for repeating events are so nerdy and visually intimidating that i'm not so sure i'd even want to present them to users until it's trimmed to a 'moron proof' version with checkboxes like "this event repeats at: this (day) every (x) days for the next (x) days"

KarenS’s picture

Making complex repeat options easy to use is much much much harder than you might think. I started with the UI used by the Event Repeat module and I think I made it much more user-friendly than that was, but it still could certainly be improved. If you think you can make it better, patches are welcome :)

But of course, that would be another issue.

zilla’s picture

i hear you - this is the same kind of nightmare that devs working on products like ical and outlook run into when they try to build a one-size fits all solution for repeating event options

perhaps it could just use all of what's there BUT with an admin option to show one of two combinations on the form:

1) default advanced configurations for repeating events (exactly what's there now)
2) super simple checkbox options (a handful of preconfigured selections from option 1 like:
--same time/day for next X weeks
--same time on (pop up calendar to pick next date)
---(add another - meaning, click 'add another' to pick another 'same time on:'

not sure what that entails, i'm not a coder! but switching to a simple popup and choose the next one approach, or a simple 'again and again for X weeks' makes the user experience less intimidating - i showed the complex repeat options to a low-tech person and he was spooked out, that's why i disabled it...

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.