onButtonClick

fires when the user clicks today or clear buttons

void onButtonClick(Date date){ ... };

Parameters

dateDatethe selected date (if today) or NULL if clear

Example

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

Change log

added in 4.6.1

Back to top