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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:06:49+00:00 2026-06-01T20:06:49+00:00

I have jQuery calendar. I have to make it so that only Monday or

  • 0

I have jQuery calendar. I have to make it so that only Monday or Tuesday etc are selectable depending on other variables. Now if today is 27 of April 2012 and the selectable days are Thursday with mindate set as 27th of April 2012 or the current date, The default month will still be April even if there are no selectable dates there.

How can I make it so that in those case the default month is the month which has selectable days in it.

I hope the figure will be helpful!

enter image description here

  • 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-01T20:06:50+00:00Added an answer on June 1, 2026 at 8:06 pm

    You could use a custom function to set the defaultDate/minDate. Here I have an array that defines valid days of the week. If the current date is not one, it move forward until it finds one. You could customize something like this for your particular use:

    var validDays = [0, 1, 1, 0, 0, 1, 0];
    
    function firstDate() {
        var valDate = new Date();
        valDate.setDate(valDate.getDate() + 14);
        var day = valDate.getDay();
        var i = 0;
        while (validDays[day] != 1 && i < 7) {
            valDate.setDate(valDate.getDate() + 1);
            day = valDate.getDay();
            i++;
        }
        return valDate;
    }
    
    function validDate(date) {
        if (validDays[date.getDay()] == 1) {
            return [true, ""];
        } else {
            return [false, ""]
        }
    }
    
    $(function() {
        $("#datepicker").datepicker({
            beforeShowDay: validDate,
            minDate: firstDate(),
            defaultDate: firstDate()
        });
    });
    

    Demo: http://jsfiddle.net/jtbowden/LgLr9/1/

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

Sidebar

Related Questions

I'm using Keith Wood's jQuery datepicker http://keith-wood.name/datepick.html to make a calendar that the user
I have an asp textbox that I have hooked up to a jQuery calendar
I have used jquery calendar, and I have used to create event details, now
I have the following jQuery code: $(body.page-calendar-practices-2012-05 #content-header h1#title) which works fine. I can
I have the following jquery code: $(document).ready(function() { $(body[class*=page-calendar-practices] #content-header h1#title).after(<div id='athletics_practice-schedule'><div id='inner-title'><a href='www.example.com'
Anyone have a sample of doing a jQuery notification/popup/calendar in Intraweb ? A simple
I have a web-app that is a sort of calendar application and there are
I have an inline jquery ui datepicker that has some days disabled, like this
I have a form that takes a city as input, then I'm using jQuery
I have made this script that get's the month and the year from calendar.php

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.