Home Unanswered Active Tags New Question

Javascript Error this.table.offsetWidth is Null

We use DayPilotPro-6.0.2078.
The error throws in Scheduler.src.js on line 2598.

I change the code into the following:

         this.setRightColWidth = function(div) {
            if (this.getLayout() == 'TableBased') {
                var width = parseInt(this.width);
                var isPercentage = (this.width.indexOf("%") != -1);
                var isIE = /MSIE/i.test(navigator.userAgent);
                var rowHeaderWidth = this.getTotalRowHeaderWidth();
                
                if (isPercentage) {
                    if (this.table) {
                        if (this.table.offsetWidth > 0) {
                            div.style.width = (this.table.offsetWidth - 6 - rowHeaderWidth) + "px";
                        }
                    }
                }
                else {  // fixed
                    div.style.width = (width - rowHeaderWidth) + "px";
                }
            }
        };

There is a better solution?

Asked by Nils 1 year ago.
Replies

This bug is now fixed in the latest sandbox build (6.0.2087).

Comment posted by Dan Letecky 1 year ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java