I use the PRO and on a Toolbar I attach a calendar to an Input Item.
My code is as:
webBar.addInput(“i1”,4,"",70);
// Attach Calendar
mCal = new dhtmlxCalendarObject(“i1”,true);
mCal.draw();
…and I get the Error:
this.con is null
onmousemove()()dhtmlxcalendar.js (line 50)
startDrag()(undefined)dhtmlxcalendar.js (line 82)
show()(true)dhtmlxcalendar.js (line 85)
loadUserLanguage()(“en-us”, undefined)dhtmlxcalendar.js (line 83)
dhtmlxCalendarObject(“i1”, true, undefined)dhtmlxcalendar.js (line 48)
[Break on this error] this.daysPan.className = “dxcaldays”;th…ick = function () {if (self.isVisible())
Please help.
Thanks,
John
The problem is incompatible ids:
webBar.addInput(“i1”,4,"",70);
and mCal = new dhtmlxCalendarObject(“i1”,true);
They are different.
Make a little fix in the dhtmlxtoolbar.js file:
dhtmlXToolbarObject.prototype._buttonInputObject = function(that, id, data, pos) {
…
this.obj.innerHTML = “”+
”;
this.obj.innerHTML = “
… or you can use the following was (without editing dhtmlxtoolbar.js):
webBar.addInput(“i1”,4,"",70);
var inpObj = webBar.objPull[webBar.idPrefix+“i1”].obj.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0]; // <- input object
// Attach Calendar
mCal = new dhtmlxCalendarObject(inpObj,true);
mCal.draw();