jquerytools/jquerytools — pull request #828 by marcandre (2012-07-31 17:14:20+00:00)
Title: Fix 'change' event propagation

I'm relying on `$(document).on('change', 'input.foo')` for form validation and it is not triggered by dateInput.js because of two bugs:

1) I don't know why, but the event triggering the date change is reused. The `target` is still set to the day I clicked on, so the event won't be caught properly. My patch disregards the event passed, but if you want you could instead `delete e.target` before firing the event.

I'm no expert in JS, but I find the idea of reusing events (for different types and after they have been fired!) really ugly. Here it's reused after `beforeChange`. What if bubbling is turned off? What if, I don't know, anything was modified?

2) Clearing the date doesn't fire anything.