Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
KarenS CreditAttribution: KarenS commentedThis 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.
Comment #2
KarenS CreditAttribution: KarenS commentedI'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.
Comment #3
KarenS CreditAttribution: KarenS commentedRenaming...
Comment #4
dkruglyak CreditAttribution: dkruglyak commentedI 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
Comment #5
KarenS CreditAttribution: KarenS commentedI 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.
Comment #6
gopherspidey CreditAttribution: gopherspidey commentedI 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.
Comment #7
KarenS CreditAttribution: KarenS commentedThe '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.
Comment #8
gopherspidey CreditAttribution: gopherspidey commentedThanks for the quick response. I have turned off the "To" until that is figured out.
Comment #9
KarenS CreditAttribution: KarenS commentedFrom 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'.
Comment #10
seanbfuller CreditAttribution: seanbfuller commentedI'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.
Comment #11
KarenS CreditAttribution: KarenS commentedMaybe 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.
Comment #12
KarenS CreditAttribution: KarenS commented@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.
Comment #13
(not verified) CreditAttribution: commented