How to catch datePicker close event

I use a date picker and it works fine. Few of my web pages need some calculations using start and end dates. I would like to be able to do the calculations when closing the datepicker.

I use:

<input class = "datePicker" id = "endDate" name = "endDate" type = "text" value = "04/10/2013 23:00" / ">

Anyone have any suggestions?

+4
source share
2 answers

You are looking for a method onClose.

Refer to the API documentation here

+5
source

Simple. onClose. .

.datepicker({
    defaultDate: "+1w",
    changeMonth: true,
    changeYear: true,
    numberOfMonths: 1,
    onClose: function () {
        alert('Datepicker Closed');
    }
});
+1

All Articles