add function on date selected through date popup field
For Drupal 7, the datepicker is indeed likely to be the one from jQuery UI, and since you may not know in your own javascript if date pickers have been initialized yet, an easy way to trigger your "custom function" is to listen for selection on any date picker on the page.

  jQuery.datepicker.setDefaults({
    onSelect: function () {
      console.log('date selected');
    }
  });


Refer to the jQuery UI onSelect documentation for more information.