1

I am using Date popup module for selecting a date in a registration form. Is it possible to fire an event on date select?

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.