Ticket #7929 (closed bug: notabug)
Datepicker: Ugly event handling
| Reported by: | brstgt | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.9.0 |
| Component: | ui.datepicker | Version: | git |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Comeon, an official jquery-ui extension that uses inline-js in HTML?
...onclick="DP_jQuery_' + dpuuid + '.datepicker._selectDay(\'#'...
This makes it very hard and/or ugly to prevent this event from bubbling up. In combination with href="#" instead of href="javascript:;" this breaks our global click handler which "ajaxifies" our page.
Please stop propagation in _selectDay as this is what you probably want. And if you are really cool, you bind a SINGLE clickhandler to the whole "month sheet" and detect the clicked day by
var selectedDay = $(event.target).parent('td[data-day]').attr('data-day')
Change History
Note: See
TracTickets for help on using
tickets.


We definitely don't want to stop propagation. Datepicker is being rewritten and uses event delegation.