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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:04:22+00:00 2026-06-13T11:04:22+00:00

I’m trying to connect jQuery UI’s datepicker with a select list. I have found

  • 0

I’m trying to connect jQuery UI's datepicker with a select list.

I have found one explanation on jQuery’s Forum (
forum.jquery.com/topic/jquery-ui-datepicker-with-select-lists), but I can’t get it working.

There are input and select list both declared:

<select id="selectMonth"><option value="01">Jan</option><option value="02">Feb</option>
          <option value="03">Mar</option><option value="04">Apr</option>...</select>

<select id="selectDay"><option value="01">1</option><option value="02">2</option>
          <option value="03">3</option><option value="04">4</option>...</select>

<select id="selectYear"><option value="2012">2012</option><option value="2013">2013</option>
          <option value="2014">2014</option>...</select>

<p>Date: <input type="text" id="selectedDatepicker" /></p>

This is the script:

$(function() {
        $('#selectedDatepicker').datepicker({
    beforeShow: readSelected, onSelect: updateSelected,
    minDate: new Date(2012, 1 - 1, 1), maxDate: new Date(2014, 12 - 1, 31),
    showOn: 'both', buttonImageOnly: true, buttonImage: 'img/calendar.gif'});

// Prepare to show a date picker linked to three select controls
function readSelected() {
    $('#selectedDatepicker').val($('#selectMonth').val() + '/' +
        $('#selectDay').val() + '/' + $('#selectYear').val());
    return {};
}

// Update three select controls to match a date picker selection
function updateSelected(date) {
    $('#selectMonth').val(date.substring(0, 2));
    $('#selectDay').val(date.substring(3, 5));
    $('#selectYear').val(date.substring(6, 10));
}
    });

And here is the fiddle: http://jsfiddle.net/xKXZm/

They are not connected properly, the only “connected behaviour” is that when you click on the input button, it picks up the value of the select list. On the other hand, the select list never picks up the value of the input nor will the input pick up the value of the select list until you click on it.

  • 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-13T11:04:23+00:00Added an answer on June 13, 2026 at 11:04 am

    For the date picker input to reflect the changes in the selects, you can bind the selects’ change event to readSelected

    Check this demo: http://jsfiddle.net/xKXZm/5/

    Note that you have listed only 4 days in your day select box. So day selection beyond 4 in the datePicker will not show up in the select box.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm trying to select an H1 element which is the second-child in its group
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and

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.