Skip to main content

Search and Top Navigation

#10652 closed bug (notabug)

Opened October 07, 2014 07:52PM UTC

Closed October 07, 2014 08:00PM UTC

Last modified October 07, 2014 11:43PM UTC

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

Attachments (0)
Change History (7)

Changed October 07, 2014 08:00PM UTC by scottgonzalez comment:1

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.

Changed October 07, 2014 08:20PM UTC by carlospzo comment:2

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>

Changed October 07, 2014 08:23PM UTC by scottgonzalez comment:3

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

Changed October 07, 2014 08:54PM UTC by scottgonzalez comment:4

#10654 is a duplicate of this ticket.

Changed October 07, 2014 09:07PM UTC by carlospzo comment:5

Replying to [comment:3 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

Changed October 07, 2014 10:48PM UTC by scottgonzalez comment:6

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.

Changed October 07, 2014 11:43PM UTC by carlospzo comment:7

_comment0: Replying to [comment:6 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 invez 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......1412725565130203

Replying to [comment:6 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......