DHTMLX Docs & Samples Explorer

onClick Event

This event calls user-defined handlers (if there are any) and passes the following parameter:

  • date - the date of the clicked day in the calendar.
          mCal.attachEvent("onClick",function(date){   
              alert("Date is set to "+date) 
          })  
 

In case of double calendar there are additional parameters:

  • pointer to the calendar instance
  • “left” or “right” value depending on clicked calendar
          mDCal.attachEvent("onClick",function(date,obj,type){   
               alert("Date is set to "+date+" in the "+type+" calendar"); 
          })