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

  • Home
  • SEARCH
  • 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 8575899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:48:01+00:00 2026-06-11T19:48:01+00:00

I suppose this should work , but its not. Where did I went wrong?

  • 0

I suppose this should work , but its not. Where did I went wrong?

<link rel="stylesheet" type="text/css" media="all" href="jsDatePick_ltr.min.css" />

<script type="text/javascript" src="jsDatePick.min.1.3.js"></script>

<script type="text/javascript">
window.onload = function(){
    new JsDatePick({
        useMode:2,
        target:"inputField",
        dateFormat:"%j-%n-%Y"
    });
};
</script>

This is the date picker script, working fine with one date picker on a single page, but my requirement is to have two of them.

I did :

 From Date :<input type="text" size="12"  name="date1" id="inputField"    
readonly="readonly"/>  


To Date :<input type="text" size="12"  name="date2" id="inputField"  
readonly="readonly"/>

But it’s not working. The date picker is showing up only for the second input field. If I am creating two ids, then do I have to make the same function twice? I did that too, but it does not helped.

  • 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-11T19:48:02+00:00Added an answer on June 11, 2026 at 7:48 pm

    Two element in the same page can not have the same id. You can try the following code:

    <script type="text/javascript">
    window.onload = function(){
     new JsDatePick({
        useMode:2,
        target:"inputField",
        dateFormat:"%j-%n-%Y"
    });
    
     new JsDatePick({
        useMode:2,
        target:"inputField2",
        dateFormat:"%j-%n-%Y"
    });
    };
    </script>
    

    HTML can be like the following one:

     From Date :<input type="text" size="12"  name="date1" id="inputField"    
    readonly="readonly"/>
    
    
    
    To Date :<input type="text" size="12"  name="date2" id="inputField2"  
    readonly="readonly"/>   
    

    Hope it helps.

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

Sidebar

Related Questions

This seems like it should be obvious but I can't figure it out. Suppose
I suppose this is not so hard but I can not get it. For
Suppose I have a class with a string instance attribute. Should I initialize this
I suppose this could apply to any dynamic language, but the one I'm using
You will suppose this is a big question.but there might be a simple problem
I suppose this scratches a vast topic, but what is the best approach in
I've tried looking up other help for this problem but I'm just not getting
Ok, I have this script working 99% of how it should be working, but
Suppose this C# code: using (MemoryStream stream = new MemoryStream()) { StreamWriter normalWriter =
Suppose this is my URL route: (r'^test/?$','hello.life.views.test'), How do I make it so that

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.