Skip to content

Instantly share code, notes, and snippets.

@clemherreman
Forked from ClementDuez/script.js
Created September 18, 2012 09:58
Show Gist options
  • Save clemherreman/3742342 to your computer and use it in GitHub Desktop.
Save clemherreman/3742342 to your computer and use it in GitHub Desktop.
Adding an event handler to an already initialized jQuery UI datepicker
// Adds an event handler
$('#my_datepickerized_field').datepicker( 'option' , 'onSelect', function (date) { // 'onSelect' here, but could be any datepicker event
$(this).change(); // Lauch the "change" evenet of the <input> everytime someone click a new date
});
@roccomuso
Copy link

Exactly what i was looking for, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment