Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#13170 closed bug (worksforme)

DatePicker - Calendar, the wrong field is updated

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

Description

Hi,

I have multiple forms, with the same fields classes. (Example: you display multiple items of the same type in different forms, it makes sense to have the same ids and names.)

<form id="formUser1">

<input type="text" class="f1abcdef">

</form> <form id="formUser2">

<input type="text" class="f1abcdef">

</form>

The DatePicker is displayed correctly, at the correct position on both field.

When I click on the second field/form, the datepicker popup at the right position, but the value is updated only in the first field. It means that when I try to change the date on the second field, the date on the first field is updated with a new value.

This issue was tested on IE9, Firefox 8.

This issue related on http://bugs.jqueryui.com/ticket/7985

Change History (6)

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

Owner: set to olegarius
Status: newpending

Please provide a reduced test case showing the problem.

comment:2 Changed 4 years ago by olegarius

Status: pendingnew

Ok. Small example:

<form id="formUser1"> <input type="text" class="f1abcdef"> </form> <form id="formUser2"> <input type="text" class="f1abcdef"> </form> <script>

$("#formUser1 .f1abcdef").datepicker({ dateFormat: 'yy/mm/dd'}); $("#formUser2 .f1abcdef").datepicker({ dateFormat: 'yy/mm/dd'});

</script>

When I click on formUser2 - datepicker change text field in formUser1.

Last edited 4 years ago by olegarius (previous) (diff)

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

Resolution: worksforme
Status: newclosed

Works fine for me: http://jsbin.com/mekezubece/1/edit?html,output

Tested in Chrome 43, Firefox 38, and IE 9.

comment:4 in reply to:  3 Changed 4 years ago by olegarius

Replying to scott.gonzalez:

Works fine for me: http://jsbin.com/mekezubece/1/edit?html,output

Tested in Chrome 43, Firefox 38, and IE 9.

<br>

Sorry, but I little change Your example and it does not work at all: http://jsbin.com/mejagawahe/edit?html,output

As You can See, if we have for text-fields same ids, even if we don't use them, we have this trouble.

Last edited 4 years ago by olegarius (previous) (diff)

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

Please go read the comment in the other ticket again.

comment:6 in reply to:  5 Changed 4 years ago by olegarius

Replying to scott.gonzalez:

Please go read the comment in the other ticket again.

Ok. Got it. Thanks.

Note: See TracTickets for help on using tickets.