Would be nice to use this module with EVENT: Start Date
cookiesunshinex - April 3, 2007 - 03:39
| Project: | Views Date Range Filter |
| Version: | 5.x-1.2 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Jump to:
Description
I'm trying to use this with a custom view which is displayed as a block on my main(front) page.
I'm using it to list "Events This Week"
I have my view set to filter on Node Type: Event
Then I would like to use this module to filter Event: Start Date (is today+7)
However, this module only support Node: Create Date.
This obviously wouldn't work because sometimes people will create events several days before the Event Start Date.
I had been using Event: Start Date (is greater than) NOW, which isn't a perfect solution.
I would be great it I could use this module!
Thanks!

#1
The module supports CCK date fields. Is "Event: Start Date" a CCK date field? It would be nice if the daterange filter had an option to specify past or future dates, because as it works now, all of the default operations are for past dates. However, you can use a hook_form_alter and replace the operations with future dates.
#2
Seeing no comment on this for a week, I'm closing the issue. I believe this already works.
#3
Actually, the Event: Start Date is part of the Event Module.
After installing the Views Date Range Filter, I can add the following two fields as filters:
Node: Created Time Between
Node: Changed Time Between
If I add Event: Start Date field as a filter, I don't have the between parameters to configure like I do for the Node: Created Time Between and Node: Changed Time Between.
#4
The datarange filter currently does not support the event module. I'll leave this open as a feature request, but no promises. IMHO, this is THE Drupal date solution moving forward and the event module could eventually be dropped. Most people are implementing events with CCK, date, and calendar. If you can point to something saying the event module is here to stay, that it has active development, and that some Drupal experts think it's the right solution, then I'll bump the priority of doing this.
#5
ok, I didn't realize that most people were implementing an event system with CCK, Date, and Calendar.
I'll look into the calendar module and see how it compares. We are using the event module because you get the calendar block that displays the calendar on the left or right block and shows the event dates in bold when there is an event for that date.
Event just seems like an all in one solution for what we are trying to accomplish.
#6
#7
See also #140095
#8
You can achieve what you want using Event in the Argument Handling Code, and you don't have to use arguments from the URL. You just paste the following into the space for the Event Argument Handling:
// second, minute, hour, month, day, year
$begin = mktime(0, 0, 0, date("m"), date("d")+7, date("Y"));
$end = mktime(0, 0, 0, date("m"), date("d")+8, date("Y"));
$view->filter[] = array(
'vid' => $view->vid,
'tablename' => '',
'field' => 'event.event_start',
'value' => strftime('%Y-%m-%d',$begin),
'operator' => '>',
'options' => '',
'position' => count($view->filter),
'id' => event.event_start,
);
$view->filter[] = array(
'vid' => $view->vid,
'tablename' => '',
'field' => 'event.event_start',
'value' => strftime('%Y-%m-%d',$end),
'operator' => '<',
'options' => '',
'position' => count($view->filter),
'id' => event.event_start,
);
$view->query = '';
If ou want to build the filter based on parameters from the URL, see http://drupal.org/node/70145#comment-204051
#9
Hello Cookie, I have the same need as the one you presented here. Did you come up with a solution working with the event module?
I agree with you that "We are using the event module because you get the calendar block that displays the calendar on the left or right block and shows the event dates in bold when there is an event for that date.
Event just seems like an all in one solution".
So just let me know in case you found something :)