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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:10:53+00:00 2026-06-17T20:10:53+00:00

My code: var availableDates = [23-1-2013,24-1-2013,25-1-2013]; function available(date) { dmy = date.getDate() + –

  • 0

My code:

 var availableDates = ["23-1-2013","24-1-2013","25-1-2013"];

        function available(date) {
          dmy = date.getDate() + "-" + (date.getMonth()+1) + "-" + date.getFullYear();
          if ($.inArray(dmy, availableDates) !== -1) {
            return [true, "","Available"];
          } else {
            return [false,"","unAvailable"];
          }
        }


        $("a.pickadate").click(function () {
            $("#datepicker").datepicker({
                    beforeShowDay: available,
                    altField: '#datepicked',
                    dateFormat: "dd-mm-yy"
                });
        });
        $("#datepicker a.ui-state-default").click(function () {
            $("#datepicker").datepicker("hide");
        });

It opens fine, populates the fields fine and shows the correct date’s fine as well; just when I select something it stays open.

And my HTML is:

<input type="text" id="datepicked" name="datepicked" size="8" style="float: left;">
    <a href="javascript:void();" class="pickadate">
        <img src="media/images/icon-calendar.gif" style="float: left; margin-right: 10px;">
    </a>    
    <!-- Datepicker -->
    <div id="datepicker" style="position: absolute; left: 670px; border: 0px; z-index: 5000; top: 247px;"></div>

Why isn’t it closing? Is it to do with the CSS in the style tag? I don’t know where I should put that otherwise. If i take that out, it doesn’t close, and the positioning is awful.

  • 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-17T20:10:54+00:00Added an answer on June 17, 2026 at 8:10 pm

    jQuery UI seems to hate it when you put .datepicker on something that’s not an input of some type. Call .datekpicker() on #datepicked instead, and style the UI separately.

    http://jsfiddle.net/wvxmF/1/

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

Sidebar

Related Questions

I'm using the code: var x = function() {return true;}; trying to set x
Sample Code: var Day = Ember.Object.extend({ date:null, activities:null, // is set to an Em.ArrayProxy
I have the following code: var submitHandler = function ($link, $form, close) { var
I have the following code: var refreshId = setInterval(function() { $(#footad).html('myjshere'); }, 15500); Where
I have this code: var cadena = prompt(Cadena:); document.write(mayusminus(cadena)); function mayusminus(cad){ var resultado =
Check the code var server = http.createServer(function(req, res){ var parsedUrl = require('url').parse(req.url); var pathname
Code: var a={ value:5, test:function() { this.value=4; } } var b=someFunction( { value:5, test:function()
My code var post = {}; post.DivPostContent = $('.content'); post.DivPostContent.live({ mouseenter: function() { var
My code: var list = new LinkedList<int>(); var ramCounter = new PerformanceCounter(Memory, Available MBytes);
Code: var connection = mongoose.createConnection('mongodb://localhost:9000/' + databaseName); connection.db.dropDatabase(function(err){ // never reach this point! debugger;

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.