Opened 7 years ago

Closed 7 years ago

#7929 closed bug (notabug)

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')

Change History (1)

comment:1 Changed 7 years ago by Scott González

Resolution: invalid
Status: newclosed

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

Note: See TracTickets for help on using tickets.