Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8823943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:29:03+00:00 2026-06-14T06:29:03+00:00

Possible Duplicate: problem when cloning jQuery UI datepicker I have a problem with the

  • 0

Possible Duplicate:
problem when cloning jQuery UI datepicker

I have a problem with the jQuery datepicker. I have a div that i clone. That div contains an input element with the jQuery datepicker attached to it.

When i simply clone this element then the datepicker isn’t working on the cloned element. To fix this i had to remove the hasDatepicker class from the cloned input element and re-initialize the datepicker method.

Now the datepicker shows up on the cloned element, but whenever i pick a date, then the date gets placed in the “original” input field instead of the field that opened the datepicker…

Anyone any idea how i can fix this problem..?

Here’s a demo is the problem: http://jsfiddle.net/4VQkg/

Simply clone the element and try to pick a date fron the cloned input field. You’ll see that the data won’t get placed in the desired input field.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T06:29:04+00:00Added an answer on June 14, 2026 at 6:29 am

    try this,

    Demo: http://jsfiddle.net/4VQkg/3/

    Code:

    function initGui()
    {
        $('.date-iso8601').datepicker();
    }
    
    $(function() {
        initGui();
    
        $('.clone').click(function() {
            var clone = $('.datepicker').clone();
    
            var cloneObj = clone.find('.date-iso8601');
            cloneObj.removeClass('hasDatepicker').removeAttr('id');
    
            clone.appendTo('.elements');
    
    
            $(cloneObj).datepicker();
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: SmartGWT Dialog title not set correctly I have a problem, is that
Possible Duplicate: .Net Changes the element IDs I have the following problem (I'll explain
Possible Duplicate: Using A* to solve Travelling Salesman Problem I have recently learned that
Possible Duplicate: Problem executing bash file I have created a bash file script and
Possible Duplicate: GCC problem : using a member of a base class that depends
Possible Duplicate: Java - Regex problem I have list of URLs of types: http://www.example.com/pk/etc
Possible Duplicate: Problem with Macros Hi all I have defined this macro: #define SQ(a)
Possible Duplicate: unserialize problem I have a string in the form of: a:16:{i:0;s:3:696;i:1;s:3:698;i:2;s:3:690;} I
Possible Duplicate: Paypal Checkout Express empty cart problem i have an issue with paypal
Possible Duplicate: Circle line collision detection I have a problem. I need to find

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.