(bug) Limit.js - Arg. not valid (line 587) with ignore_month


It is an issue report.

Context :

  • I use ignore_month for excluding some days (in my case “sunday”) : that works !
  • I add markedTimespans each days : that works in day/week/month views

That works almost everywhere (good job !), but with Internet Explorer 8 (and less probably) en error occurs after one click on month view :
The month view is displayed, then an error is displayed on IE console, then the events take a looong time (at least 30 seconds) to be displayed (whereas they are displayed quickly without ignore_month or without markedTimespans or with a quick fix (see below)).

If ignore_month is not used that works, if no markedTimespans are add that works too : it is this couple of use which break the behaviour.

The IE console error (IE8 navigator/document mode) is :

On this line (587) there is the next code :

block.style.lineHeight = block.style.height = height + "px";

I have added a console.log() via Firefox juste after this line (no error with Firefox but variables have same values then IE), to bring you the context:

console.log('i=', i, 'k=', k, 'height=', height, 'block=', block, 'area=', area, 'day=', day);

The log for the last added markedTimespan (which is broken) (the view is January 2014) :

i= 0 k= 0 height= -1 block= <div class="dhx_marked_timespan my_class" style="top: 711px;"> area= <div> day= Date {Sun Jan 26 2014 00:00:00 GMT+0100 (CET)}

An example of another day (the one before the last, and other ones “looks” almost similary, event previous k=0) :

i= 0 k= 6 height= 208 block= <div class="dhx_marked_timespan my_class" style="top: 711px; height: 208px; line-height: 208px;"> area= <div class="dhx_month_body" style="height:208px; width:169px;"> day= Date {Sat Jan 25 2014 00:00:00 GMT+0100 (CET)}

The differences between the two are the “height” and the “area”.
The error seems to come from the height = 1 (which is perhaps not enabled by IE for “line-height” and/or “height” properties ?).

A very quick, but bad fix I have tried (use of ‘0px’ if calculated height is negative) :

block.style.lineHeight = block.style.height = ((0 > height) ? 0 : height) + "px";

The best would be to find the real way to avoid theses errors.
I hope that would help to improve this behaviour.

thank you for the detailed report.
We’ve confirmed the issues, fix will be included into upcoming version of the component. I can post fixed version in this topic when it will be ready, if you need it

Hi Aliaksandr,

You’re welcome for the report.
It would be great if you can post it, thanks for the offer.

Here is the updated version, the bug must be fixed
dhtmlxScheduler_140128.zip (218 KB)

Hi Aliaksandr, and thanks ; that works as expected.