Opened 12 years ago
Last modified 7 years ago
#6814 open bug
datepicker('setDate') incorrectly overwrites current display with two datepickers
Reported by: | john.firebaugh | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.datepicker | Version: | 1.8.7 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
<!DOCTYPE html> <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $('input').datepicker(); $('#a').datepicker('setDate', new Date(2000, 0, 1)); $('#b').datepicker('setDate', new Date(2010, 0, 1)); $('#a').focus(); $('#b').datepicker('setDate', new Date(2011, 0, 1)); }) </script> </head> <body> <form> <input id="a"></input> <input id="b"></input> </form> </body> </html>
Note that '#a' is focused and open, but now displaying the date for '#b' (January 2011). This is due to improper sharing of the singleton "dpDiv".
Change History (9)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Datepicker: Modified _updateDatepicker to not update display if updated instance is not current instance. Fixed #6814 - datepicker('setDate') incorrectly overwrites current display with two datepickers.
Changeset: b4ef2f7ebb1162f75d8fa3276d73e4746bcace84
comment:4 Changed 10 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This caused a much more serious problem: #8522.
comment:5 Changed 10 years ago by
Milestone: | 1.9.0 → 1.11.0 |
---|
comment:6 Changed 10 years ago by
Status: | reopened → open |
---|
comment:8 Changed 9 years ago by
Milestone: | 1.11.0 → none |
---|
comment:9 Changed 7 years ago by
This bug is not reproduced . $(#b) component is correctly overwritten. I tried this bug with latest version jQuery UI 1.11.4.
Note: See
TracTickets for help on using
tickets.
This is still happening on master (1.9.0pre).