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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:41:41+00:00 2026-05-14T05:41:41+00:00

I am trying to add a Jquery calendar picker to a text box at

  • 0

I am trying to add a Jquery calendar picker to a text box at the time of creation, but I cant find how.

When I press a button, it will create a table, the element I want to attach the Jquery calendar picker is:

var txtDate = createTextInput(i, "txtDate", 8, 10);
txtDate.className  = "datepicker";
this.newcells[i].appendChild(txtDate);

I tried adding at the end :

txtDate.datepicker();

But does not work. Can anybody help?

Thanks.

Note: CreateTextInput is:

function createTextInput(i, strName, size, maxLength) {
    var input = document.createElement('<input>');
    input.type = "text";
    input.name = strName;
    input.id = strName + i;
    input.size = size;
    input.maxLength = maxLength;

    return input;
}
  • 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-05-14T05:41:42+00:00Added an answer on May 14, 2026 at 5:41 am

    Use

    $("#txtDate").datepicker();
    

    instead of

    txtDate.datepicker();
    

    You can create an element using jQuery with ease. Something like

    $("<input type='text' />").attr("id", '').appendTo("yourelement");
    

    You can rewrite the createtextinput function like this in jQuery

    function createTextInput(i, strName, size, maxLength) {
        return $("<input />".attr({
            type: 'text',
            name: strName,
            id: strName + i,
            size: size,
            maxLength: maxLength
        });    
    }
    

    If you are returning the jQuery object then you can directly call datepicker(), like

    txtDate.datepicker();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to add jQuery using Greasemonkey's @require / @include method, but it doesn't
I'm trying to add some effects with jQuery to splitted words, but I don't
i am trying to add jquery dtepciker to my application in Grails(Intelli J) but
I'm trying to add a close a jquery ui dialog box from an ajax
I'm trying to add an iframe using jquery this way below, but when I
I'm trying to add classes via jQuery. Funny thing is, last-child works but first-child
Hi I was trying to add a row to a table using jQuery, but
I'm trying to add and remove some rows from a table using Jquery. But
Im trying to add jQuery to one of my projects, but can't get it
Im trying to add a Jquery validation script to a form plugin for wordpress.

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.