1

I'm creating a calendar of event content types by using the date and calendar modules.

I already know how to customize the time grouping settings to set the time from particular time to the other (from Calendar: How to limit the range of hours in Days display?). Now I want to display the time as a duration like 09.00 -10.00 AM, 10.00 - 11.00 , 11.00 -12.00 , 12.00 - 1.00 format. I also don't want to display the times which don't have an event at the time.

For e.g :

  1. Event one - 09.00 -10.00 Am
  2. Event Two - 10.00 - 11.00
  3. Event Three - 12.00- 2.00
  4. Event Four - 04.00 - 06.00

I want to display this as :

  1. 09.00 -10.00 - Event one
  2. 10.00 - 11.00 - Event Two
  3. 12.00- 2.00 - Event Three
  4. 4.00 - 6.00 - Event Four

This is the result I'm trying to get from the day calendar view display. In the display, the time which doesn't have an event is not listed in the time column (e.g., from 2.00 - 4.00). Could anyone help me in this?

Thanks in advance.

0
2

Ranjani, if you want to collapse all times which don't contain events for the day, then I don't think you really need to be using a day-calendar format? I think your best bet would be to just do a regular table display for your view.

  1. Change your view to be a table format
  2. Have the time range in one column and the event title in the other
  3. To get the range in the first column, just display your date in two separate fields, the first time, display the 'from' time, in the second one display the 'to' time
  4. Go into your field settings (screenshot) and select those date fields to be shown inline. You can then specify which character should separate the inline fields. Use a '-' in your case.

Does that get things close to what you were hoping?

enter image description here

enter image description here

6
  • Thanks Boriana,I tried your method but i'm getting the events with current day date and time in one column and the event tile in the other column in the day format.I have to list the time duratiom alone for the event in the column for the day view.And the next thing is I have to show the all day event as a bar between these two columns
    – Ranjani
    Jul 16 '12 at 10:07
  • Thanks for your post ,Boriana.Currntly i'm getting the output as 07/12/2012 - 16.45 to 07/31/2012 - 16.45 ,Event 1 ,07/12/2012 - 09.00 to 10.00 , Event 2 , 07/12/2012 11.30 to 14.30 - Event 3.But I wanna show the all day events as bar vertical bar between the two column and the events will be listd with time alone for the particular day... If you could help me means,please post your answer..
    – Ranjani
    Jul 16 '12 at 10:17
  • Ranjani, I really don't understand your second question in the comment above. Sorry. You did not mention all day events in your original question, so I was just answering what you originally asked. If your original question here was answered, perhaps you could open a second, separate question relating to what you're trying to achieve with all-day events? Screenshots and clear formatting can really help us figure out what you're aiming for. I don't fully understand what you're asking from your description above. :-( Jul 16 '12 at 13:58
  • Really sorry Boriana(not conveying the right format and requirements).will open a second one.Thanks for helping me.. :)
    – Ranjani
    Jul 16 '12 at 14:51
  • Hi Boriana, I opened a second one drupal.stackexchange.com/questions/37184/… . I think this would be very clear.If not ask me and will let you know.
    – Ranjani
    Jul 17 '12 at 5:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.