event on calendar_time

Hi!
Is there a way to add an event to get the value of minical ?
I tried to put on change event on input of date and it is not working.
I need to call a method when date is changed.

Thanks!

Do you mean calendar section in the lightbox? or some separate minical?

if you are using separate minical you can use

scheduler.renderCalendar({ handler:function(){ do something } })

In case of form-section - there is no any public handlers, new one can be added by code modification only.

This is my caseā€¦ How can I do it?

dhtmlxscheduler_minical.js ( uncompressed version can be found in sources/ext)

locate next lines

handler:function(new_date){ inp.value = scheduler.templates.calendar_time(new_date); inp._date = new Date(new_date);

and change them as

handler:function(new_date){ inp.value = scheduler.templates.calendar_time(new_date); inp._date = new Date(new_date); scheduler.callEvent("onDateChanged", [inp.value, inp._date]);

now you will be able to use

scheduler.attachEvent("onDateChanged", function(value, date){ ... do something ... });

Cool :wink:
Thanks a lot!