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 9208275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:34:52+00:00 2026-06-18T00:34:52+00:00

I have a table which each cells is a part of a form. In

  • 0

I have a table which each cells is a part of a form. In my form i have a jquery datepicker apply on a input element:

<form method="post" action="test.php">
                <table>
                    <tr>
                     ....
                        <td>
                            <input type="text" id="date" name="test"/>
                        </td>
                     ....
                    </tr>
                </table>
                <button type="button" id="addLine">Add line</button>
                <button id="submit" type="submit">Submit</button>
            </form>

I add my datepicker like this:

$(document).ready(function() {
            $('#date').datepicker({showAnim: "slideDown"});   
        });

Here comes the problem… i want to add a line to my table but the datepicker doesn’t apply on the new added line…

$(document).ready(function() {
            $('#addLine').click(function() {
                var line = $('<tr>...<input type="text" id="date" name="test"/>...</tr>');
                $('table').append(line);
              });
        });

The new line appears but when i want to insert a value the datepicker doesn’t pop out on the new created line.

i’ve tried to put a another $(‘#date’).datepiker()… in my .click(function… but it doesn’t work. I’ve also tried to refresh the dom with a method called page().. but i’ve got a error that the method doesn’t exist on the element. I need your help!

Thank you

  • 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-18T00:34:53+00:00Added an answer on June 18, 2026 at 12:34 am

    You cannot have multiple ids with the same value, which might be causing some of your problems. Use a class name instead, for example class="date"

    <input type="text" class="date" name="test"/>
    

    Since you are dynamically adding the content, after it is loaded you can then fire the datePicker function.

    So:

    line.find(".date").datepicker({showAnim: "slideDown"})
    

    Sample: http://jsbin.com/omoyiy/2/edit

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an HTML table in which the first column's cells each contain a
I have a table with 150x150 cells which each have a colored background and
I have a table in which each of its TD contains image (more precisely,
I have a recursive table in which each record has an ID and a
I have a DB table in which each row has a randomly generated primary
I have a html table in which each line ( <tr> ) represents a
I have a Categories table in which each category has a ParentId that can
I have a table called restaurants which contains each restaurant information, I want to
I have a table which is zebra-striped (different background color for each odd rows).
I have a table which is being dynamically populated, each row contains two textfields

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.