search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Disabled Cells don't work in Chrome

Asked by Anonymous
4 years ago.

Hi, I try to use disabled cells as described in https://doc.daypilot.org/scheduler/disabled-cells/
I want to disable a complete row/resource.

dp.onBeforeCellRender = function(args) {
    if (args.cell.resource === "Projekte") {
        args.cell.disabled = true;
        args.cell.backColor = "#000000";
    }
};

This seems to work perfectly in Firefox 73, but not in Chrome 80. Do you have any hint?
Comment posted by Dan Letecky [DayPilot]
4 years ago.

Unfortunately, I'm not able to reproduce the problem in the online demo:
https://javascript.daypilot.org/demo/scheduler/cellsdisabled.html

Do you see the problem at that page as well?

Comment posted by Anonymous
4 years ago.

This is really strange. The online demo works fine, thanks for that pointer.

Also if I replace the above onBeforeCellRender by

dp.onBeforeCellRender = function(args) {
if (args.cell.y <= 1) {
args.cell.disabled = true;
}
};

(as i actually want to disable the first two resources) it works fine. But with

if (args.cell.resource === "Projekte") {
args.cell.disabled = true;
args.cell.backColor = "#ccc";
}

it does not. I checked with the debugger that the if clause is true and I can also see that the backColor changes. Only the Cell disabling doesn't work here.

Comment posted by Anonymous
4 years ago.

The problem seems to be related to the fact that the cells I want to disable are within a frozen row!
In fact I can't manage to get onBeforeCellRender work on these 2 frozen rows.

If I check for if (args.cell.y <= 1), it also disables the first "regular" (i.e., not frozen) row
If i check for if (args.cell.grid !== "main") I get the exact same behavior as above. I can change the color, but not the disabled state.

Could you please advise?

Comment posted by Dan Letecky [DayPilot]
4 years ago.

Thanks for the update - let me check that.

Comment posted by Anonymous
4 years ago.

Any news on that topic?

Thanks a lot for your great support!

Comment posted by Dan Letecky [DayPilot]
4 years ago.

Please hold on, it's in the queue ;-)

Answer posted by Dan Letecky [DayPilot]
4 years ago.

This issue should be fixed now in the latest sandbox build (2020.1.4295):

https://release.daypilot.org/changes/js/

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.