Skip to main content
svh
Helper ⭐️⭐️
Sep 2, 2025 2:48 PM UTC
Solved

Hide dates from past events

Hi! I’m using Events to host on-demand webinars. The challenge is that the past event date still shows, which makes me worry people think it’s over instead of available to watch. I’m using Events because it’s the best way to organize and display the webinars.

Is anyone aware of a way to hide or remove the date for on-demand events? Any tips would be greatly appreciated!

Thanks,

Stine

jvdc
jvdcAnswer
Expert ⭐️
Sep 3, 2025 9:24 AM UTC

Ok, I was just trying with the console, but did not actually inject in the 3rd party scripts… 😅 jquery doesn't seem to work actually… sorry.

 

But I did test this and it works!

<script>
document.querySelectorAll(".event-item-detail-container").forEach(item => {
const type = item.querySelector(".event-detail-item__type");
if (type && type.textContent.trim() === "On-demand webinar") {
const date = item.querySelector(".event-item__date");
if (date) date.style.display = "none";
}
});

</script>

 

8 replies

jvdc
Expert ⭐️
Sep 2, 2025 3:20 PM UTC

You can probably use some script that catches if your event is “on-demand webinar”. Something like this:

$(".event-item-detail-container").each(function () {
const $container = $(this);
const typeText = $container.find(".event-detail-item__type").text().trim();

if (typeText === "on-demand webinar") {
$container.find(".event-item__date").hide();
}
});

Add it before the </body>.

It's not the most stable as it just looks at the text, so if your site gets translated it won't work for example...

Translate
svh
svhAuthor
Helper ⭐️⭐️
Sep 3, 2025 8:07 AM UTC

Thanks ​@jvdc! I tried on our sandbox but could not get it to work. Thank you anyways :) 

Translate
jvdc
Expert ⭐️
Sep 3, 2025 8:09 AM UTC

did you enclose in between <scrip> </script> ?

Translate
svh
svhAuthor
Helper ⭐️⭐️
Sep 3, 2025 9:01 AM UTC

I did...now 😅 But it did not make a difference 

 

Translate
jvdc
Expert ⭐️
Sep 3, 2025 9:11 AM UTC

Hmm ok, on your stage site, do you have events with the tag ON-DEMAND WEBINAR ?

Translate
svh
svhAuthor
Helper ⭐️⭐️
Sep 3, 2025 9:13 AM UTC

I do :) I added in lower case also, in case it was case sensitive.

Translate
jvdc
jvdcAnswer
Expert ⭐️
Sep 3, 2025 9:24 AM UTC

Ok, I was just trying with the console, but did not actually inject in the 3rd party scripts… 😅 jquery doesn't seem to work actually… sorry.

 

But I did test this and it works!

<script>
document.querySelectorAll(".event-item-detail-container").forEach(item => {
const type = item.querySelector(".event-detail-item__type");
if (type && type.textContent.trim() === "On-demand webinar") {
const date = item.querySelector(".event-item__date");
if (date) date.style.display = "none";
}
});

</script>

 

Translate
svh
svhAuthor
Helper ⭐️⭐️
Sep 3, 2025 11:55 AM UTC

This works, thank you! It removes the date from the overview page which gives a much better experience. 

Translate