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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:38:06+00:00 2026-05-24T19:38:06+00:00

im using an inline JQuery UI datepicker with an onSelect callback function. This function

  • 0

“im using an inline JQuery UI datepicker with an onSelect callback function. This function collects selected dates in an array for multiple dates. My problem is that datepicker calls this function on startup with selecting today, and adding it to my array. How can I disable this behaviour? I dont need to know which day is today, don’t want to add it to my array automatically…
Thanks in advance for nay help!

Edit: Here’s my (pretty simple) onSelect callback as requested:

var blocked_days = new Array([..]);
function updateSelected(dateText)
{
    var toAdd = true;
    for (var i in blocked_days)
    {
        if (dateText == blocked_days[i])
        {
            blocked_days[i] = null;
            toAdd = false;
        }
    }
    if (toAdd === true)
        blocked_days[blocked_days.length] = dateText;

    $("#special_offer_blocked_form_blockeddays").val(blocked_days.join());
}
  • 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-24T19:38:07+00:00Added an answer on May 24, 2026 at 7:38 pm

    Have you got your code for the onSelect callback function?

    One way around it would be to update the callback function with a check that checks that the date is not today. If it isn’t then add the date.

    If you can provide an example of your onSelect code I will be more than happy to take a look and add this?

    Update:

    What you could do then is set a simple counter each time the function is called, always ignoring the first call.

    var number_of_updates = 0;
    var blocked_days = new Array([..]);
    function updateSelected(dateText)
    {
        number_of_updates++;
        if (number_of_updates > 1)
        {
            var toAdd = true;
            for (var i in blocked_days)
            {
                if (dateText == blocked_days[i])
                {
                    blocked_days[i] = null;
                    toAdd = false;
                }
            }
            if (toAdd === true)
                blocked_days[blocked_days.length] = dateText;
            $("#special_offer_blocked_form_blockeddays").val(blocked_days.join());
        }
    }
    

    Try that and see if that works?

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

Sidebar

Related Questions

I'm using this jQuery inline datePicker plugin sample but I don't know how to
How do I trigger this inline function onClick=showMenu('mnu_searches', event, 0, this) using JQuery...if I
I am trying to pass one variable to a jQuery function inline (i.e.: using
I am using the jquery ui datepicker inline mode view I want to be
I am using jQuery UI for an inline datepicker. By simply calling it on
I'm using jQuery ui Datepicker to display a yearly inline calendar full of special
well im using this script right here: http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/ and I have a multiMonth plugin
I'm using the datepicker control for jquery and all is well except that I
I'm trying to do inline editing for my website using jQuery so I can
What is the advantages/disadvantages of using inline functions in C++? I see that it

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.