It would be awesome if the CCK Date module could allow users to select a date ranges, so that the field could end up saying something like "between 9pm and 11pm on Tuesdays and Thursdays" or something to that effect. In the absence of a fully-functional helpdesk module for Drupal, it'd be great if CCK could provide these kinds of fields needed to build help request ticket nodes.

Comments

KarenS’s picture

Title: Date Ranges? » Allow date ranges in a single record
Status: Active » Postponed

This is an interesting idea, but I don't have time to do anything with it right now. If someone else wants to submit something to consider, I'd be glad to review it. This might be a bit hard to do. I'll postpone this until someone has time to work on it.

I changed the title, since there's been conversation and updates for date ranges in views filters and arguments, so it was a bit confusing.

KarenS’s picture

Version: 4.7.x-1.x-dev » 7.x-1.x-dev
Status: Postponed » Active

I'm gettnig ready to start thinking about implementing something along these lines. What I want to end up with is an option for a 'from' and 'to' date for each date instance, and ultimately an integration with event_repeat as an API to allow you to add multiple values for the repeats, which would drop into the node as multiple occurances of the date. For instance, you would mark a date as being from 1pm to 2pm on such and such a date and repeat it every Tues and Thurs.

This is a multiple step process. I plan to get something working very soon for the from-to option. The repeat option will not be available until Sean Fuller has a chance to re-work the event_repeat into an api, which he is planning to do with 5.0, so this will be a 5.0 feature.

KarenS’s picture

Title: Allow date ranges in a single record » Allow date ranges and date recurrances

Renaming...

dkruglyak’s picture

I have no doubt this feature will be at its best in 5.x, but wonder if something could be done for those unfortunate enough to be stuck with 4.7 for a good while... I am sure I am not alone here.

Also wanted to be sure to link to my notes on the duplicate: http://drupal.org/node/97966

KarenS’s picture

I just posted changes to the HEAD version to allow an optional 'To' date, so you can set a 'From' and a 'To' date. This will need testing and tweaking before it is ready to port to 5.0 and 4.7, but the process is started.

gopherspidey’s picture

I have installed date 5.x-1.1. The problem that I have is with updateing existing fields with the optional "To" date. If it is empty it defaults to Jan 1, 2007. I would think that I would not display.

KarenS’s picture

The 'to' dates are new, and there is also new handling for default values in CCK. I haven't quite got the combo of 'to' date and 'default values' all working correctly yet. There are more changes coming to default values, the current system is just a stopgap until I get it working.

gopherspidey’s picture

Thanks for the quick response. I have turned off the "To" until that is figured out.

KarenS’s picture

From and to dates have now been ported to the 5.x and 4.7 branches. You can manually input a recurring series by making a field multiple and filling out each date occurance manually. Stage two of this process will have to wait on the event_repeat module to create the necessary logic for things like 'repeat every Tuesday'.

seanbfuller’s picture

I'm testing it out in Drupal 5.x. I had problems setting Data Settings to required and multiple, while the To Date is required. I keep getting "A 'To' date is required for the %delta value of %field" when I try to submit the new event, no matter what I enter. Flipping To Date to optional fixed the problem.

KarenS’s picture

Maybe the new default values handling in CCK is trying to interfere. The date module is supposed to have opted out of the CCK default values, but it's a new feature that just got changed and maybe something broke. I'll have to investigate it.

KarenS’s picture

Status: Active » Fixed

@Sean, it was a problem with the new default value handling and I've fixed it in the latest commit.

@gopherspidey, your idea of displaying a blank 'to' date when it is optional makes sense, so I also altered that in latest commit.

I'm going to mark this issue fixed because it's starting to include too many separate ideas and issues. Let's start separate new issues for any other specific things that come up related to the handling of from and to dates and getting repeat dates working.

Anonymous’s picture

Status: Fixed » Closed (fixed)