Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#4921 closed bug (notabug)

datepicker can't be clone propertily

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

Description

i have a input linked to datepicker in my demo. i can't clone the datepicker after i do some steps like below: 1.focus on the last cell in the first row, so that call out the datepicker; 2.click "add Row"; 3.new row is added; 3.focus on the last cell in the last row. the datepicker dose not work.

but if i omit the step 1,the demo is ok.. please kindly help.

Attachments (1)

datepicker test.rar (77.5 KB) - added by pokerwen 13 years ago.
please call me when i dosn't describe the problem clearily

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by pokerwen

Attachment: datepicker test.rar added

please call me when i dosn't describe the problem clearily

comment:1 Changed 13 years ago by pokerwen

I'm running this program on win xp and IE.

comment:2 Changed 13 years ago by pokerwen

I finally worked it out.. i flow steps shown below: 1.clone the element which need to show DatePicker 2.the "hasDatepicker" class should be remove after being clone 3.call $(object).datepicker();

comment:3 Changed 13 years ago by Jörn Zaefferer

Resolution: invalid
Status: newclosed

Problem solved?

comment:4 Changed 11 years ago by psy0rz

Please reopen this ticket.

The way the datepicker is implemented doesnt allow it to be cloned. There are numerous of clumsy workarounds on the internet like this one:

http://stackoverflow.com/questions/2358905/cloning-datepicker-objects-jquery

Most of them have side effects and are ugly.

So i still consider this a bug: I think the datepicker should be implemented in such a way it can be cloned without a problem.

If thats difficult because we cant do without that unique id-attribute, then we should add a datepicker("reinit") function. (datepicker("refresh") doenst seem to deal with this)

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

See #3803. We don't support this for any widget, and likely won't.

comment:6 Changed 10 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.