Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#10652 closed bug (notabug)

conflict container datepicker id

Reported by: carlospzo Owned by:
Priority: minor Milestone: none
Component: ui.datepicker Version: 1.10.4
Keywords: Cc:
Blocked by: Blocking:

Description

hello I have a problem in dial datepicker

when using the container with the following situation

$("#idcontainer1 datepicker").datepicker() $("#idcontainer2 datepicker").datepicker()

there is a conflict in the inputs

Change History (7)

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

Component: ui.coreui.datepicker
Resolution: notabug
Status: newclosed

Please ask for help on IRC, the forums, or Stack Overflow as there is no information about the problem and the selectors don't look real. If you can provide a reduced test case and describe the actual conflict, we can reopen the ticket and investigate.

comment:2 Changed 5 years ago by carlospzo

Your test

<!doctype html> <html lang="en"> <head>

<meta charset="utf-8"> <title>jQuery UI Datepicker - Default functionality</title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css"> <script src="http://code.jquery.com/jquery-1.10.2.js"></script> <script src="http://code.jquery.com/ui/1.11.1/jquery-ui.js"></script>

<script> $(function() {

$("#container1 #datepicker").datepicker(); $("#container2 #datepicker").datepicker();

}); </script>

</head> <body>

<div id="container1">

<p>Date: <input type="text" id="datepicker"></p>

</div>

<div id="container2">

<p>Date: <input type="text" id="datepicker"></p>

</div>

</body> </html>

comment:3 Changed 5 years ago by Scott González

The id must be unique. That's an invalid page.

comment:4 Changed 5 years ago by Scott González

#10654 is a duplicate of this ticket.

comment:5 in reply to:  3 Changed 5 years ago by carlospzo

Replying to scott.gonzalez:

The id must be unique. That's an invalid page.

sorry but as unique id? is with the different selector, all components of jquery work this way unless the datepicker.

yes I have the same id since that is outside the container, so the filter container and subsequently the input is so runs each jquery

comment:6 Changed 5 years ago by Scott González

This is not a bug in jQuery UI. It's a bug in your code. As I said earlier, the page is invalid because you've used the same id on multiple elements. Please use the forums, IRC, or Stack Overflow for help.

comment:7 in reply to:  6 Changed 5 years ago by carlospzo

Replying to scott.gonzalez:

This is not a bug in jQuery UI. It's a bug in your code. As I said earlier, the page is invalid because you've used the same id on multiple elements. Please use the forums, IRC, or Stack Overflow for help.

perfect (Y) datepicker component when not used an id in the field, it just generates a random id to know which input is working. each of the jquery works perfectly with the filters by id hierarchy in all other components, except in the datepicker. can only be joking, saying that the problem is in my code. fix the problem under the scribing Method jquery datepicker inside using the selector to swapping using the id that is wrong with this component. should follow the pattern of all other components using the selector, I am very sad about it, but one day someone will see and will be surely not an amateur......

Last edited 5 years ago by carlospzo (previous) (diff)
Note: See TracTickets for help on using tickets.