Check documentation for the latest version of dhtmlxSuite onButtonClick DHTMLX Docs

onButtonClick

fires when the user clicks the Today or Clear buttons

void onButtonClick(Date date);
dateDatethe selected date (for the Today button) or NULL (for the Clear button)

Example

myCalendar.attachEvent("onButtonClick", function(date){
    if (date == null) {
        // clear button
    } else {
        // today button
    }
    // hide calendar if needed
    this.hide();
});

Change log

added in 4.6.1

Back to top