Skip to main content

Search and Top Navigation

#6814 open bug ()

Opened January 06, 2011 12:21AM UTC

Last modified May 28, 2016 07:24AM UTC

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:
<!DOCTYPE html>
  <script type="text/javascript" src=""></script>
  <script type="text/javascript" src=""></script>
  <script type="text/javascript">
    $(document).ready(function () {
      $('#a').datepicker('setDate', new Date(2000, 0, 1));
      $('#b').datepicker('setDate', new Date(2010, 0, 1));
      $('#b').datepicker('setDate', new Date(2011, 0, 1));
  <input id="a"></input>
  <input id="b"></input>

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".

Attachments (0)
Change History (9)

Changed May 14, 2012 04:14PM UTC by joliss comment:1

This is still happening on master (1.9.0pre).

Changed July 12, 2012 11:03AM UTC by mrozik comment:2

_comment0: commit: \ pull:
_comment1: commit: \ pull:
_comment2: commit: \ \ pull:

Changed July 17, 2012 08:09PM UTC by Maciej Mroziński comment:3

resolution: → fixed
status: newclosed

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

Changed August 26, 2012 09:23PM UTC by scottgonzalez comment:4

resolution: fixed
status: closedreopened

This caused a much more serious problem: #8522.

Changed October 11, 2012 02:43PM UTC by scottgonzalez comment:5


Changed October 27, 2012 08:19PM UTC by mikesherov comment:6

status: reopenedopen

Changed August 06, 2013 05:59PM UTC by scottgonzalez comment:7

#9482 is a duplicate of this ticket.

Changed June 24, 2014 11:43PM UTC by scottgonzalez comment:8

milestone: 1.11.0none

Changed May 28, 2016 07:24AM UTC by kyodot comment:9

This bug is not reproduced .

$(#b) component is correctly overwritten.

I tried this bug with latest version jQuery UI 1.11.4.