dhtmlxCalendar 3.0 pbm with this.activeCon.id

Hello all,

I am evaluating dhtmlxCalendar 3.0, fine work, but have some problem to get the this.activeCon.id from my calendar attach to several input.
Here is my code :
function doOnLoad() {
myCalendar = new dhtmlXCalendarObject([“d_entree”, “d_sortie”, “d_alerte”]);
var myID = this.activeCon.id;
The calendar is well shown with the correct language and active. My input field is filled with the correct date but I got this javascript error message :
TypeError: ‘undefined’ is not an object (evaluating ‘this.activeCon.id’)
and my function “onChangeDate” is never callled.

Thanks for your help.
Best regards
Laurent Wallard

activeCon was not a public property. And it doesn’t set in calendar 3.0

You may use may set onfocus event handler for inputs to get an active input:

var active; var ids = ["d_entree", "d_sortie", "d_alerte"]; for(var i = 0; i < ids.length; i++) document.getElementById(ids[i]).onfocus = function(){ active = this.id } ... myCalendar.attachEvent("onClick",function(date){ onChangeDate(active) });