Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#4240 closed bug (fixed)

Datepicker: destroy, disable, and enable methods affect sibling datepickers

Reported by: ihumanable Owned by: rdworth
Priority: critical Milestone: 1.7.2
Component: ui.datepicker Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

Description

When $(...).datepicker('destroy'); is issued all image buttons (buttons defined during initialization with a buttonImage and buttonImageOnly: true) for all datepickers are removed.

An example is attached, clicking the init startdate and init enddate will place two images on the screen in the correct position and wired properly. Clicking either of the remove buttons, removes both of the images instead of just the one associated with the datepicker being destroyed.

Attachments (2)

datepicker.html (954 bytes) - added by ihumanable 9 years ago.
Datepicker HTML Test Case
cal.gif (127 bytes) - added by ihumanable 9 years ago.
Sample image used by test case

Download all attachments as: .zip

Change History (12)

Changed 9 years ago by ihumanable

Attachment: datepicker.html added

Datepicker HTML Test Case

Changed 9 years ago by ihumanable

Attachment: cal.gif added

Sample image used by test case

comment:1 Changed 9 years ago by Jörn Zaefferer

Milestone: TBD1.7
Priority: minormajor
Summary: Datepicker Destroy BugDatepicker destroy affects other datepickers

comment:2 Changed 9 years ago by rdworth

Milestone: 1.71.8

comment:3 Changed 9 years ago by rdworth

Owner: set to rdworth
Status: newassigned

comment:4 Changed 9 years ago by rdworth

Resolution: fixed
Status: assignedclosed

Fixed in r2303

comment:5 Changed 9 years ago by rdworth

Summary: Datepicker destroy affects other datepickersDatepicker: destroy, disable, and enable methods affect sibling datepickers

This also affects 'enable' and 'disable' methods. For all three (destroy, enable, disable) it only affects sibling datepickers. So as a work-around, you can put each datepicker input or div in a wrapper element.

comment:6 Changed 9 years ago by rdworth

Priority: majorcritical

comment:7 Changed 9 years ago by rdworth

Milestone: 1.81.7.1

merged to 1.7.1 in r2327

comment:8 Changed 9 years ago by rdworth

Milestone: 1.7.11.8
Resolution: fixed
Status: closedreopened
Version: 1.6rc61.7.1

appendText is also affected

comment:9 Changed 9 years ago by rdworth

Resolution: fixed
Status: reopenedclosed

fixed in r2350

comment:10 Changed 8 years ago by rdworth

Milestone: 1.81.7.2
Note: See TracTickets for help on using tickets.