| Sample: dhtmlxCalendar | onClick event handler | dhtmlxCalendar main page |

You can set an onclick event handler

    <script>
    mCal.attachEvent("onClick",mSelectDate);
    function mSelectDate(date) {
        document.getElementById('mCalInput').innerHTML = mCal.getFormatedDate("%d.%m.%Y", date);
        return true;
    }</script>

attachEvent method sets function called when specified event occurs.
In case of onclick event a function incoming argument is the date of clicked day in the calendar.