I just tracked down an issue that was causing the jQuery UI Datepicker to be
incompatible with ASP.Net validator controls. Here's the ticket:

http://dev.jqueryui.com/ticket/4071

and a visual test page:

http://jquery-ui.googlecode.com/svn/trunk/tests/visual/datepicker/datepicker_ticket_4071.html

The issue is occurring when a date (an A element) in the datepicker is
clicked, it calls $(INPUTelement).change() and when the event handler bound
to that element is triggered, it gets the click event on the A instead of a
change event on the input.

It seems when an event is triggered programatically in IE, and the event
handler was bound via the onchange attribute (whether html or javascript)
instead of attachEvent, a new event object isn't created if you call
elem.oneventname() but one is if you call elem.fireEvent('oneventname').
Here's a minimal test page:

http://jsbin.com/oliwi

source: http://jsbin.com/oliwi/edit

It seems it could be solved easily by using .fireEvent if it exists inside
of .trigger():

elem.fireEvent && elem.fireEvent( type ) || elem[ type ]();

Thoughts?

- Richard

References:

Jquery datepicker popup not closing on select date in IE8
http://stackoverflow.com/questions/1704398/jquery-datepicker-popup-not-closing-on-select-date-in-ie8

Fire the onchange event the browser independent way
http://www.rakshith.net/blog/?p=35

Event class for jQuery
http://groups.google.com/group/jquery-dev/msg/1d7ab35fa59fa053

--

You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to