Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#4891 closed bug (notabug)

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:

Description

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.

Change History (2)

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

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.

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

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.