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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:45:09+00:00 2026-05-13T22:45:09+00:00

I am trying to create two different sets of settings for datepicker( http://keith-wood.name/datepick.html )

  • 0

I am trying to create two different sets of settings for datepicker(http://keith-wood.name/datepick.html) when the user picks different radiobuttons in a group.

Here’s my code:

$("input[name='shipping_time_english']").change(function(){
   datepicker();                                                     
});

function datepicker() {
  if ($("input[name='shipping_time_english']:checked").val() == '1-3 work days') {
    alert('1-3 days selected');
    var firstDay = '+1';
    var lastDay = '+3';
  } else if ($("input[name='shipping_time_english']:checked").val() == '4-8 work days') {
    alert('4-8 days selected');
    var firstDay = '+4';
    var lastDay = '+8';
  }

  $("#rush_needed_by_english").datepick({
    minDate: firstDay,
    maxDate: lastDay
  }); 
} //end datepicker function

I know the change event is working, because the alerts are alerting each time I change the value of the radiobuttons. For some reason, the settings on the datepicker are whatever the first value on the radiobuttons is that I select. As soon as I change the radiobutton value again, the settings on the datepick don’t change as I would like.

Why can I not update settings on datepicker using change in jQuery?

  • 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-13T22:45:10+00:00Added an answer on May 13, 2026 at 10:45 pm

    Change this

    $("#rush_needed_by_english").datepick({
        minDate: firstDay,
        maxDate: lastDay
    });
    

    to

    $("#rush_needed_by_english").datepick('option', {
        minDate: firstDay,
        maxDate: lastDay
    });
    

    You just got the call wrong. Recheck the documentation for the plugin here jQuery Datepicker Reference and then scroll to the functions documentation. It’s the second signature there.

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

Sidebar

Related Questions

I'm trying to create a simple form with two different submit buttons: one which
I am trying to create two separate sessions- one for if the user is
I am trying to create two separate sessions- one for if the user is
I am trying to create two thumbnails of an image uploaded by user. I
I'm trying to create two different tables with ISO 3166 2 code database for
I'm new to XCode/iOS and I'm trying to create a segue between two different
I'm trying to create a Foreign Key out of two values in two different
Hi every one i'm trying to create two divs. One div has a different
I am trying to merge two sets of analytical data from two different providers.
I'm trying to create a custom cursoradapter that will use two different layouts depending

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.