Skip to main content

Search and Top Navigation

#7929 closed bug (notabug)

Opened December 01, 2011 02:08PM UTC

Closed December 01, 2011 02:19PM UTC

Datepicker: Ugly event handling

Reported by: brstgt Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.datepicker Version: git (not yet released)
Keywords: Cc:
Blocked by: Blocking:
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')

Attachments (0)
Change History (1)

Changed December 01, 2011 02:19PM UTC by scottgonzalez comment:1

resolution: → invalid
status: newclosed

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