Our powerful JS Calendar component


Post by antonio.martin »

We are trying to use the resource grouping feature in the Bryntum Calendar. Everything seems to work fine when the sidebar is visible. However, once we hide the sidebar, an extra unnamed column appears in the calendar view.

How can we remove this additional column when the sidebar is hidden?

Also, is it possible to customize the column header using HTML or a component?

    <BryntumCalendar
      modes={{
        dayresource: {
          hideNonWorkingDays: false,

      // Configure a nice min-width for the resource columns
      minResourceWidth: '10em',

      // Demo uses more padding than default, switch to the short event duration "earlier" to fit contents
      shortEventDuration: '1 hour',
    },
  }}
  // sidebar={false}
  sidebar={{
    items: {
      resourceFilter: {
        minHeight: '22em',
        store: {
          // Group resources by a custom `team` field
          groupers: [{ field: 'groupBy', ascending: true }],
        },
        // initially select record team members of the Austin team
        selected: [1, 2],
      },
    },
  }}
  tbar={null}
  bbar={null}
  events={events}
  resources={resources}
  resourceStore={{
    groupers: [{ field: 'groupBy', ascending: true }],
  }}
  // ...
/>

Thanks in advance for your help!

Attachments
with sidebar
with sidebar
Screenshot 2025-04-09 at 12.19.30 PM.png (337.42 KiB) Viewed 109 times
without sidebar
without sidebar
Screenshot 2025-04-09 at 12.18.28 PM.png (272 KiB) Viewed 109 times

Post by Animal »

What happens if you do

calendar.resourceStore.map(resource => resource.name)

As here?

Screenshot 2025-04-10 at 07.36.09.png
Screenshot 2025-04-10 at 07.36.09.png (148.5 KiB) Viewed 100 times

Post by Animal »

antonio.martin wrote: Wed Apr 09, 2025 8:22 pm

Also, is it possible to customize the column header using HTML or a component?

Do you mean the "Day Center" header in your screenshot?

You can return HTML there, as I changed this example to do: https://bryntum.com/products/calendar/examples/custom-rendering/

Screenshot 2025-04-10 at 07.42.33.png
Screenshot 2025-04-10 at 07.42.33.png (176.4 KiB) Viewed 100 times

Post by Animal »

Actually, I see what is happening there. The group record is being included.

This will be fixed: https://github.com/bryntum/support/issues/11092


Post by antonio.martin »

Thank you for you quick response. We will wait for the fix in the new version then.

About the custom columns, I mean the column where the avatar and the name are when we use the dayresource mode.

Attachments
Screenshot 2025-04-10 at 5.35.48 AM.png
Screenshot 2025-04-10 at 5.35.48 AM.png (33.33 KiB) Viewed 86 times

Post by Animal »


Post Reply