Our powerful JS Calendar component


Post by jq123 »

In v5.3.5, the scheduleMenuFeature onItem callback returns the wrong time on item.date. This issue does not seem to be present in v5.3.4.

        scheduleMenuFeature: {
             ....
            onItem: (item) => {
                 console.log(item);  // item.date is incorrect
            },
        }

In the screenshot below, the user clicks on the time slot for Tue May 16 2023 19:00:00, but the API erroneously returns Tue May 16 2023 18:00:00. Note that we did not set a timeZone property on BryntumProjectModel.

Screenshot 2023-05-19 at 4.31.09 PM.png
Screenshot 2023-05-19 at 4.31.09 PM.png (46.79 KiB) Viewed 362 times

Post by mats »

I can't reproduce this based on the code provided. Could you please provide a full minimal test case to verify the issue?


Post by Animal »

I have tried it in a page which is scrolled, using a week view which doesn't use 00:00 as the day start time, and it still gets the right date from the event.

We definitely need some more details.


Post by jq123 »

Apologies, I may have provided the wrong callback. I found out that the onScheduleClick callback gets fired first, and we obtain the date from this callback. This callback appears to have the wrong date.

const onScheduleClick = (info) => {
   console.log(info.date); // has incorrect date
}

return (
            <BryntumCalendar
                ref={calendar}
                project={project}
                onScheduleClick={onScheduleClick}
                ... // other config props
            />
 );

Post by Animal »

There is of course only one way of ascertaining date from an event. "click" goes through the same pathway.

This works too.

There must be something different in your setup.


Post by jq123 »

Hey mats and Animal, we've identified the issue on our end. We used some CSS to hide the time ticks on time axis because we only wanted to show the hour tick. When we removed this CSS override, the API returns the correct date.

    .b-dayview-timeaxis-tick:not(.b-dayview-hour-tick) {
        // display: none;
    }

Now, we'd like to know if there were changes in the last upgrade that added a dependency on the axis time ticks. In addition, is there another way to hide the ticks that are not hour ticks?

Screenshot 2023-05-22 at 17.23.18.png
Screenshot 2023-05-22 at 17.23.18.png (14.74 KiB) Viewed 299 times

Post by Animal »


Post Reply