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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:10:02+00:00 2026-05-25T06:10:02+00:00

Hi I have looked through other posts, which has been marked as correct –

  • 0

Hi I have looked through other posts, which has been marked as correct – and are the same as what I ave been trying. BUT for some reason I cannot get more than one instance of datepicker to work on my pages. Could anyone think of a reason why as there is no problems in the error console.

$('.hasDatepicker').each(function(){
    $(this).datepicker({autoSize: true,dateFormat: 'dd-mm-yy'}); // new doesn't work
});

$('#notedate').datepicker({autoSize: true,dateFormat: 'dd-mm-yy'}); // original - works

and the HTML

<input type="text" name="dob" id="dob" class="inputText hasDatepicker">
  • 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-25T06:10:03+00:00Added an answer on May 25, 2026 at 6:10 am


    No need to give .each. This should work

    $('.hasDatepicker').datepicker({autoSize: true,dateFormat: 'dd-mm-yy'}); // wont work :)
    

    The above code wont work because hasDatepicker is a class that jQuery UI automatically assigns the inputs.

    Please change the class name to something like

    $('.dp').datepicker({autoSize: true,dateFormat: 'dd-mm-yy'}); // will work :)
    

    Demo: http://jsfiddle.net/PaGmj/

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

Sidebar

Related Questions

I've seen the other posts, but they dont have the markers being looped through
i have looked through other related questions but none of them giving me right
I've looked through some of the other posts but couldn't find an answer, so
I have looked through the other SO posts that seem to be of the
I've downloaded the Windows Media Center SDK and have looked through the documentation, but
I've looked through the other related posts to my question already over the past
First of all: I looked through other posts on stackoverflow and none of them
I have looked through replacing colors in an image but cannot get it to
I have looked through other similar entries, and not found a solution. I have
Ok.. I have looked through this site and just can't seem to find the

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.