Our pure JavaScript Scheduler component


Post by johannesbeck »

Hi,

I have absences, that I want to display in the scheduler. I've set up a store for this:

resourceTimeRangeStore() {
      return new ResourceTimeRangeStore({
        autoLoad: true,
        autoCommit: true,
        readUrl:
          ABSENCES_PATH +
          "?startDate=" + this.startDateText +
          "&endDate=" + this.endDateText,
        transformLoadedData: payload => {
          for (const absence of payload) {
            absence.resourceId = absence.employee.personId 
            absence.startDate = absence.start + "T00:00" // absence.start -> "2025-05-22"
            absence.endDate = absence.end + "T00:00"
            absence.name = absence.title
            absence.timeRangeColor = 'red'
            absence.important = true
          }
          console.log(payload)
          return payload
        }
      })
    },

Also I get the correct payload:

Bildschirmfoto 2025-05-22 um 08.40.30.png
Bildschirmfoto 2025-05-22 um 08.40.30.png (108.74 KiB) Viewed 70 times

I implemented the store like this:

<bryntum-scheduler-pro
        ref="scheduler"
       [...]
        :resource-store="resourceStore"
        :event-store="eventStore"
        :anchor-store="anchorStore"
        :resource-time-range-store="resourceTimeRangeStore"
        [...]
/>

But there are no time ranges shown. Did I forget something?


Post by alex.l »

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy

We do not write the code in bounds of forum support. If you need help with development, contact us via bryntum.com/services


Post by johannesbeck »

No I did not. That was the reason.
Thanks :)


Post Reply