Skip to main content

Search and Top Navigation

#4891 closed bug (notabug)

Opened October 03, 2009 03:55PM UTC

Closed October 04, 2009 03:21PM UTC

Last modified October 11, 2012 09:15PM UTC

Duplicate ids within separate div's DatePicker works great but places data in first no matter what

Reported by: jurrinus Owned by:
Priority: major Milestone:
Component: ui.datepicker Version: 1.7.2
Keywords: duplicate ids Cc:
Blocked by: Blocking:

I have a reusable form which has a date text box in to which, when the form is initialized, I attach the datepicker. So to the first form I use jQuery to locate the text field like so $('#div1 #thedate') and to the second I attach the date picker in the same manner like: $('#div2 #thedate'). Note two different selectors. Date picker shows itself correctly on each text box however when I select a date in any one of the text boxes it places the date in the first one.

Now there is a ticket already on such an error and it was closed with the comment that you cannot have to fields within the same DOM but I question this because then we are concluding you cannot re use a form. I think this is a bug in datepicker.

Attachments (0)
Change History (2)

Changed October 04, 2009 03:21PM UTC by scottgonzalez comment:1

resolution: → invalid
status: newclosed

I'm not sure how you're trying to "re use a form", but if you're creating a DOM with multiple elements that have the same ID, you're creating invalid HTML.

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:2

milestone: TBD

Milestone TBD deleted