#3338 closed bug (fixed)
Big datepicker bug with IE and no id on the attached input element
Reported by: | skoon | Owned by: | grabanski |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | ui.datepicker | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I'm seeing a bug using the datepicker that appears to be related to having at least two input elements with datepickers attached that have no id attribute specified.
Using the following HTML/Script
<script type="text/javascript" src="http://www.google.com/jsapi"></
script>
<script type="text/javascript">
Load jQuery google.load("jquery", "1.2.6"); google.load("jqueryui", "1.5.2");
</script>
</head> <body>
<div id="first"><input type="text"></div> <div id="second"><input type="text"></div>
<script type="text/javascript">
google.setOnLoadCallback(init); function init() {
$("#first > :input").datepicker({ showOn: "button", buttonImage:
"calendar.gif", buttonImageOnly: true});
$("#second > :input").datepicker({ showOn: "button", buttonImage:
"calendar.gif", buttonImageOnly: true});
};
</script>
</body>
Clicking on the calendar button on the second input and selecting a date will cause the first input element to be populated with the selected date in IE6/IE7.
Fixed. Assigned ID was set by time to the millisecond, which could result in two fields getting the same ID. IDs are now sequential.