dhtmlX Calendar

there is an event onChange for the attached input box. When i change the value from calendar the standard event onChange on the inputbox is not fired.



Thanks


Hello,


you can use the calendar onclick event handler in this case. It will be called when you choose the date in calendar:


calendar.attachEvent(“onClick”,function(date){
/your code/
})



I’m a bit stuck here as well. I’ve linked the calendar to more than 1 input as shown in one of the examples:

calendar = new dhtmlxCalendarObject(["input1", "input2", "input3"]);

How do I set the onclick event handler so that only the input box that’s been modified gets an onchange event?

Thanks.

There is a private property activeCon - the object of the active input

calendar.attachEvent("onClick",function(date){ var inputID = this.activeCon.id; })

Hello!

I have a fat problem with the Calendar.

I have a field that contains the date. The calendar it is showed onClick, and I want that when the user clicks on a date, and the field is updated with the selected date, to call another java script function.

I added this:
calendario.attachEvent(“onClick”, myFunction);

but this function is called when i click the field, not when I click on the calendar.

So, can anyone help me?

Hello,

but this function is called when i click the field, not when I click on the calendar.

calendario.attachEvent(“onClick”, myFunction); sets event handler for calendar. So, when you’ve chosen the calendar date, myFunction will be called with selected date as a parameter.

Please explain the issue in detail.

Works perfectly! Thanks.