I would like to style a view so that if it is an event over multiple days that the end date also shows But if it is just a single day the end date which would be a duplicate does not show.
I think this would have to be using CSS to hide single day events and date thought I would check if there is some way of being able to show this I can’t think of a way myself!
An example in the screenshot below is the “hello peeps exhibition” 11 May-18jun. The view is clever enough to show it is still a current event but a casual observer May think the view is broken and in the past. But if I always show the end date the view would be unnecessarily cluttered

Comments

artatac created an issue. See original summary.

artatac’s picture

Issue summary: View changes
mandclu’s picture

You should be able to get pretty close to what you're after by creating a custom Smart Date Format, by going to /admin/config/regional/smart-date in your site. There's a default Date Only format, but you could create one called Date Only Compact or similar. Leave the Time Format blank and use a Date format of D M j.

For a range like the example you've provided, that will show Wed 11 May - Sat 18 Jun. Single day events won't show a range. If you don't want to show the days of the week, use a Date Format value of M j.

artatac’s picture

StatusFileSize
new588.96 KB

Thank you great to know there’s a solution! The challenge I have is that this is a view and therefore I have to choose a particular field and none of the various “when” fields options seem to show from to? See screenshot attached

mandclu’s picture

The first option should output the range.

artatac’s picture

StatusFileSize
new612.26 KB

Tried that and nothing showed up so before bothering you again I created a new view and the aspect you described above works great (thanks) https://lowestoftoldandnow.org/tmp33
But I think the aggregation aspect that allows recurring events to appear correctly on the home page maybe stops the smart range appearing?

mandclu’s picture

Good point. The aggregation is intended to allow multivalued/recurring values to display properly, and works best showing content display (e.g. teaser) instead of showing fields. If it works better for your use case without aggregation, feel free to remove it.

artatac’s picture

Thanks for the reply. It would seem with views I can either have it handle recurring dates well or have it show multi day events well but not both ;-) all good thanks for your guidance

mandclu’s picture

Status: Active » Closed (works as designed)