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

Javascript Error this.table.offsetWidth is Null

Asked by Nils
13 years ago.

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?

Comment posted by Dan Letecky
13 years ago.

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

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