scheduleObj.setWorkHours() does not work anymore is would seem ...

No matter what I do this does not change the working hours, I think it used to, it's broken now?  This is an older repository of yours that shows it's possible, and it does work, I've pulled it down, I'm doing the exact same thing in the Recent version of your React code and it doesn't work

https://github.com/SyncfusionExamples/ej2-react-scheduler-resource-different-work-hours

The code above does ... this.scheduleObj.setWorkHours()

where my Typescript react code has to do this:  scheduleObj.current?.setWorkHours()

I know my code is correct, I've followed the same exact model as your code, but only with the Modern SyncFusion react libraries, doesn't work. Also, OnDataBound() gets called after onRenderCell() which makes it hard to even take advantage of the working hours.

Basically, everything has to go through scheduleObj.current and in your older version it doesn't, I suspect something broke here? Can you guys create a modern version of your example on GitHub above? Our company just purchased the OEM library license and we really need this functionality to work.






4 Replies

MG Mike Griffin October 16, 2024 08:45 PM UTC

Here's the issue, I believe, DataBound is called before OnRenderCell, either way, this functionality no longer works in the most recent Sceduler for React, this is a pretty big deal for us. Also note on that demo the "OwnerColor" is not being honored, they all have the exact same color. I was hoping each Group member could have different cell background colors but it appears I cannot do that unless I write the entire thing manually, the cell state of "work hours" isn't set in RenderCell() because it's executing before DataBind()



SR Swathi Ravi Syncfusion Team October 17, 2024 02:20 PM UTC

Hi Mike,

Thank you for contacting us and sharing your feedback.

We understand the importance of the issues you’ve mentioned, and we will address them in our latest version. The setWorkHours() method is functioning as expected in the most recent release. For your convenience, we've prepared an updated sample that demonstrates this functionality.


Regarding the "OwnerColor" issue and the triggering of onRenderCell and onDataBound methods, both are working correctly in the shared sample. You can review it for further clarification on how these methods are executed and how the Owner ID colors are applied appropriately. If still you are facing the same issue, share the complete code snippets of scheduler and package version you have used.

Please don't hesitate to reach out if you need further assistance, and we are here to ensure everything works as you expect with the latest Syncfusion version.

Regards,
Swathi


MG Mike Griffin October 18, 2024 06:48 AM UTC

Yes, that is working pretty well, however, one thing. Why is it when we color the background of the cells the highlighting no longer works? Is there any way we can still make that work, when we hover over the colorized cells?



SR Swathi Ravi Syncfusion Team October 21, 2024 01:37 PM UTC

Mike,

 

Thank you for your feedback! Could you please provide more details about which specific cells you colored and how you applied the background color? We want to understand the issue better, as we were unable to replicate the problem when hovering over the colored cells on our end. This information will help us find a solution for the highlighting functionality.

 

Sample: react-scheduler-setworkhours-class-comp (forked) - StackBlitz


Loader.
Up arrow icon