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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:37:10+00:00 2026-05-11T00:37:10+00:00

I need to limit the jquery ui date picker to only have future Tuesdays

  • 0

I need to limit the jquery ui date picker to only have future Tuesdays and Thursdays as selectable days.

How can I accomplish this?

  • 1 1 Answer
  • 2 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. 2026-05-11T00:37:11+00:00Added an answer on May 11, 2026 at 12:37 am

    Provide an onSelect handler to the datepicker and have your handler validate that the dates fit your defined criteria. I’m not sure where the onSelect fires so you may have ‘undo’ the selection if you can’t stop the event and alert the user.

    One way of doing this would be to develop a custom date validator class that takes parameters and then call that date validator from the onSelect function. The onSelect function could take care of interacting with the datepicker itself to keep the design clean.

    From http://docs.jquery.com/UI/Datepicker/datepicker#options

    $('div.selector').datepicker({    onSelect: function(dateText) {      alert(dateText);   }  }) 

    To change the display and selectability of a particular date or set of days use a beforeShowDay handler and have it change the selectability and CSS for the date in question.

    $('.selector').datepicker({ beforeShowDay: nationalDays})     natDays = [   [1, 26, 'au'], [2, 6, 'nz'], [3, 17, 'ie'],   [4, 27, 'za'], [5, 25, 'ar'], [6, 6, 'se'],   [7, 4, 'us'], [8, 17, 'id'], [9, 7, 'br'],   [10, 1, 'cn'], [11, 22, 'lb'], [12, 12, 'ke'] ];  function nationalDays(date) {     for (i = 0; i < natDays.length; i++) {       if (date.getMonth() == natDays[i][0] - 1           && date.getDate() == natDays[i][1]) {         return [false, natDays[i][2] + '_day'];       }     }   return [true, '']; } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP page I need to limit execution access of to only
I would like to have jQuery limit a file upload field to only jpg/jpeg,
I need to limit the number of characters that can be appended to an
I need to limit the input from a user to only positive values, and
I have an events log database. I need to limit the size of SQL
I have written some JavaScript and jQuery code that accepts only numeric input in
I have a few areas on my site where I need to limit text
Hai all i need to know how i can make next page in jQuery.
Using jquery how can I limit the number of characters that can be typed
I need to limit the amount of time and cpu taken by external command

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.