# Hide event end times on month layout

**URL:** <https://community.elfsight.com/t/hide-event-end-times-on-month-layout/174436>\
**Category:** Customization\
**Tags:** event-calendar\
**Created:** [September 16, 2026, 7:28pm UTC](https://community.elfsight.com/t/hide-event-end-times-on-month-layout/174436 "2026-09-16T19:28:44Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [September 17, 2026, 11:27am UTC](https://community.elfsight.com/t/hide-event-end-times-on-month-layout/174436/3 "2026-09-17T11:27:05Z")

</div>

Hey there, @lilykgamble 👋

This script should do the trick:

```auto
const SELECTOR = '.fc-dayGridMonth-view .fc-event-time'; 
const observed = new WeakSet();

const collectRoots = (root, acc = []) => {
  acc.push(root);
  root.querySelectorAll('*').forEach((el) => {
    if (el.shadowRoot) collectRoots(el.shadowRoot, acc);
  });
  return acc;
};

const stripEndTime = (root) => {
  root.querySelectorAll(SELECTOR).forEach((el) => {
    let dashPassed = false;

    Array.from(el.childNodes).forEach((node) => {
      if (node.nodeType === Node.TEXT_NODE) {
        const value = node.nodeValue.replace(/\u00A0/g, ' ');

        if (!dashPassed) {
          if (value.includes('-')) {
            dashPassed = true;
            const start = value.split('-')[0];
            if (node.nodeValue !== start) node.nodeValue = start;
          }
          return;
        }

        if (node.nodeValue !== '') node.nodeValue = '';
        return;
      }

 
      if (dashPassed && node.style) node.style.display = 'none';
    });
  });
};

let scheduled = false;
const scan = () => {
  if (scheduled) return;
  scheduled = true;

  requestAnimationFrame(() => {
    scheduled = false;

    collectRoots(document).forEach((root) => {
      stripEndTime(root);

      if (observed.has(root)) return;
      observed.add(root);

      new MutationObserver(scan).observe(root, {
        childList: true,
        subtree: true,
        characterData: true
      });
    });
  });
};

scan();

```

  

Please add it to the **Custom JS** field on the **Settings** tab of your widget’s settings and let me know if it helped 🙂

We also have a Wishlist request to add a Hide end time option to the settings. Please upvote this idea if you’d like to see it in the future: [Hide end time (Month layout)](https://community.elfsight.com/t/hide-end-time-month-layout/43205)

---

_[View the full topic](https://community.elfsight.com/t/hide-event-end-times-on-month-layout/174436)._
