Dhtmlxcalendar.js - dhtmlxEvent : wCal.con has no properties


* FireFox ( also IE7 has problem )

dhtmlxcalendar.js V2.5

calendar is in a grid.

script error occure after grid addRow



     for (cal in window.dhtmlxCalendarObjects){

         var wCal = window.dhtmlxCalendarObjects[cal];


         if (wCal.con[0].nodeName == ‘INPUT’) —> error

             wCal.hide ()


—> script error

wCal.con has no properties

(no name)(click clientX=0, clientY=0)dhtmlxcalendar.js (line 119)

[Break on this error] if (wCal.con[0].nodeName == ‘INPUT’)



Locally the issue isn’t recreated. Please take a look at the sample: dhtmlxGrid/samples/01_cell_types/01_calendar_grid.html ( dhtmlx.com/docs/products/dht … _grid.html )

If the problem still occurs, please provide a complete demo

I have the same problem without using dhtmlxGrid. I will try to recreate it in a simple form.

I’m sorry but I can’t make an example that recreates the problem. But I’ ve found that the problem in my case occurs when the calendar is attached to an . If the calendars open on a

it works ok.

I’m going to correct my previous answer. The problems in my case is related with the use of prototype.js. Someone could confirm this point? Thanks

Hi, I can confirm that point. I have the same problem with prototype.js . Without it works fine.

We have the calendar object  attached to a div which is inside a layout container.
Clicking outside of the area of the calendar (on the toolbar for instance) throws the following error: wCal is undefined (dhtmlxcalendar.js Line 50) .

Correction: error is wCal.con is undefined - not just wCal.

Have the exact same issue - Prototype.js and dhtmlxclaendar.js not playing together nicely. Throws up error - ‘con.0’ is null or not an object - when running the following - if (wCal.con[0].nodeName == ‘INPUT’) wCal.hide ()

Any progress on this issue?



the attached version of calendar will solve the issue with prototype. Try to use it instead of the original one

dhtmlxcalendar.zip (114 KB)

Thanks Alex. Your posted code solves the issue… but creates a new one.

I have the calendar attached to an input box. Now when you open the calendar “NaN undefined NaN” appears in the input box. Click on a date in the calendar and the correct date appears in the input box. Click anywhere else on the screen and “NaN undefined NaN” remains in the input box.

Any ideas?


locally the issue isn’t reproduced. Please, provide some sample that allows to recreate it.