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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:44:03+00:00 2026-06-14T03:44:03+00:00

I found a problem with jQuery UI Datepicker on my site. When I click

  • 0

I found a problem with jQuery UI Datepicker on my site.

When I click on the input, it does show a datepicker properly.
Nevertheless, when I don’t select any date and I just click outside the element, it doesn’t hide the datepicker as I’d expect.

When I press the Esc, it disappears, when I select a day it disappears but when I click outside it stays there.

Is there anyone who is able to find the problem?

Link: http://pec.solarismedia.net/index.html#content

  • 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-14T03:44:04+00:00Added an answer on June 14, 2026 at 3:44 am

    Your datepickers have the class hasDatepicker, so try this:

    $(".hasDatepicker").blur(function(e) { $(this).datepicker("hide"); });
    

    I’m 99% positive that will work!

    And FYI, if you want it to be dynamic (apply to inputs created after), you can use .on

    $(".hasDatepicker").on("blur", function(e) { $(this).datepicker("hide"); });
    

    UPDATE (PS, to use the following completely remove the above from your code)

    To answer your comment, the following may not be the best solution, but through trial and error (on your site, using console) it works! And it’s relatively short compared to alternate ways I thought of.

    $(document).click(function(e) { 
        var ele = $(e.toElement); 
        if (!ele.hasClass("hasDatepicker") && !ele.hasClass("ui-datepicker") && !ele.hasClass("ui-icon") && !$(ele).parent().parents(".ui-datepicker").length)
           $(".hasDatepicker").datepicker("hide"); 
    });
    

    As One Line

    $(document).click(function(e) { var ele = $(e.toElement); if (!ele.hasClass("hasDatepicker") && !ele.hasClass("ui-datepicker") && !ele.hasClass("ui-icon") && !$(ele).parent().parents(".ui-datepicker").length) $(".hasDatepicker").datepicker("hide"); });
    

    the problem i encountered was being able to tell when the span icon was clicked, it wasnt really wanting to cooperate, thus the extra has class checks

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

Sidebar

Related Questions

Ok, so I'm quite new to jQuery, but found this bizzare problem just now,
I am having a problem with the jQuery datepicker. My form has a add
I use jquery's .submit() to intercept user's submit event, however I found a problem.
I have a problem with jQuery and I don't know where comes from, here
I've used some jQuery UI sortable plugins but I always found the same problem,
I have a date field (i'm using the jquery ui datepicker) in a form
I'm trying to upgrade jQuery from 1.4.1 to 1.7.1 and found a problem with
I have a problem with jquery and a dynamic table. I want a click
I am just trying to learn jQuery and I found one problem. I have
I have found a problem with use JQuery timeout, i have a page with

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.