Search code examples
dhtmlxdhtmlx-scheduler

How can I get the date after clicking on calender in yearly view in dhtmlx scheduler?


When i click on a date i need to take the selected date, it's working fine on daily, weekly and monthly view by using code below :

scheduler.attachEvent("onEmptyClick", function(date , event){ alert(date); });

but, the date variable don't return a correct value in case of yearly view

Does anyone have a solution for this issue?


Solution

  • The above will not work in next two cases

    • clicking on date with events ( not empty click )
    • clicking on month name, week name or empty space ( onEmptyClick event will be triggered, but will have null instead of date )

    Only clicking on day cells will trigger onEmptyClick event with valid date.