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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:16:52+00:00 2026-06-12T12:16:52+00:00

when our event edit page is loaded, there are two date fields where the

  • 0

when our event edit page is loaded, there are two date fields where the jquery datepicker is used and the picker also appears when I click on one of these fields.

datepicker is initialized when the document is loaded.

$ ->
  $(':input.date').datepicker(dateFormat: 'dd.mm.yy')

and the class ‘datepicker’ is added automatically

<input class="span1 date hasDatepicker" id="event_application_opening_at" name="event[application_opening_at]" size="30" type="text">

because it’s possible to add other dates to an event, we’re creating additional, nested date fields when the user clicks on the “Add Date” link.

Although the “hasDatepicker” class is assigned to these fields correctly, the datepicker doesn’t work on these newly created ones. It looks like this happens because the datepicker is initalized already. I tried to apply the destroy() function and then to re-initalize datepicker on the whole page content, but this didn’t work.

Anyone out there who can help me with that?

  • 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-12T12:16:53+00:00Added an answer on June 12, 2026 at 12:16 pm

    Try this

     $(":input.date").live("click", function(){
            $(this).datepicker({ 
                dateFormat: 'dd.mm.yy' 
            });
        });
    

    update:

    $(":input.date").live("click", function(){
                $(this).datepicker({ 
                    dateFormat: 'dd.mm.yy' 
                });
              $(this).datepicker('show');
    
            });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our application is modulraized (Group of modules doing specific things). The modules have event
We use the log4net to log the winform application's event and error. Our customer
Edit: changing .ready() call per Matt's suggestion. I use jQuery to configure some stuff
Our product includes a Flash application that is loaded by SWFObject. For one customer,
I am developing a table that will contain all our users which can also
I am trying to code an app for work where our clients can edit
I recently went live with our new home page, after heavily testing it in
We have a DLL used as the middle layer between our website front end
I used harism's page curl ( Harism, thanx a lot for this excelent library!)
I have a standard many-to-one relationship set up. There are a bunch of fields,

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.