We have a view with separate displays for day/week/month/year.

There are numerous serious issues with the week display.

1) There is js code to set the height of the "single-day-container" element. This code doesn't work properly, and always results in the container having a height of zero. Looking at the code, it is hard to tell precisely what it is intended to do (@see: js/calendar_overlap.js in the calendar_resizeViewport function), since there's little commenting; it isn't clear why one would subtract the top offset, since this can be any value, and frequently causes a zero height table.

2) Less concerning, but still a bug - the code references a grippy icon that doesn't exist in the project, resulting in a 400 error in the console.

3) Events may be sorted into the incorrect time slot, depending on the timezone set in Drupal. This is occurring around line 455 in calendar.theme.inc for the week display, and also effects the day display.

4) It looks like when the display is in overlap mode, if multiple events occur at the same time, only one of them is visible (mostly a css issue, effects day and week displays).

5) Nice to have - it would be good to have the date next to the day names, perhaps in brackets.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jeremylichtman created an issue. See original summary.

jeremylichtman’s picture

Issue summary: View changes
jeremylichtman’s picture

Issue summary: View changes
jeremylichtman’s picture

Issue summary: View changes
jeremylichtman’s picture

Issue summary: View changes
jeremylichtman’s picture

Issue summary: View changes
jeremylichtman’s picture

Issue summary: View changes
jeremylichtman’s picture

Issue summary: View changes
jeremylichtman’s picture

The attached patch fixes the following issues:

* Ensures events show in the right time slot (day/week displays) when the Drupal timezone is not UTC.
* Disables the resizing javascript that caused table height to always be zero.
* CSS mods to clean up alignment of the day/week displays

mwmentor’s picture

Hi Jeremy:

Thanks for the patch - works like a charm :)

-M

jeremylichtman’s picture

You're welcome.

sleepingmonk’s picture

Hey Jeremy!

Noticed an additional issue with this patch.

While the items are now appearing in the correct time slot on the day and week views, if they're within the difference between UTC and the timezone, they end up on the next day.

To reproduce, create an item with Pacific Timezone (UTC -8), and set the time within 8 hours to midnight.
i.e.: 2017-09-21T21:00:00

This item will appear at 9pm on the 22nd NOT the 21st.

This happens on Day, Week, and Month displays.

jeremylichtman’s picture

Reworked the patch from above. The new patch reworks the start/end datetimes at the views row level, so that they are placed into the right buckets in the first place (i.e. instead of trying to sort them into the right buckets at the theme preprocess level).

jeremylichtman’s picture

Previous patch had whitespace errors.

acrollet’s picture

Status: Active » Needs review
FileSize
1.98 KB

This patch no longer applies to head - I'm uploading a re-roll that only includes the css/js changes and additionally:

1. adds the missing grippie.png file (no longer in core)
2. uses .length instead of the deprecated .size() method

I'd humbly suggest that it might make sense to split the other concerns into separate issues? Feels like it will be to keep an omnibus patch up to date and get it accepted.

manuga’s picture

Hi, I tried #15 patch and works for me

minorOffense’s picture

I would say take the 4 issues listed in the description and create issues for each. Then link them to this parent issue. The patch in #15 can be it's own issue as well and set the relation.

That way the maintainer can test the individual items more easily. But looking over what @jeremylichtman did those seem like valuable improvements and we should help get them merged in.

catch’s picture

FileSize
1.6 KB

Patch no longer applied for me, seems to be just context. Here's a re-roll.

catch’s picture

FileSize
1.13 KB

And one without the size/length fix - getting a conflict with other patches in the queue.

catch’s picture

FileSize
1.48 KB

Missed the binary hunk.

oriol_e9g’s picture

Status: Needs review » Reviewed & tested by the community

Aplies and works.

  - Installing drupal/calendar (dev-1.x 1ef5b86): Cloning 1ef5b86b11 from cache
  - Applying patches for drupal/calendar
    https://www.drupal.org/files/issues/2018-08-02/calendar-2901594-20.patch (Week view not displaying correctly)
solide-echt’s picture

Version: 8.x-1.x-dev » 8.x-1.0-alpha2
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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