jquery calendar UI daterange stops this month

I have the datepicker set up on my site. I specified the changemonth and changeyear as true.

what i noticed is the month dropdown only shows from January until the current month. How do I need to adjust the options to show all 12 months in the dropdown box?

$('#dob').datepicker(  {changeMonth: true, changeYear: true, yearRange:"c-80:c+0"});

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
I cannot replicate with your code - see sample code below - working sample here
<!doctype html>
<link href="css/bootstrap.css" rel="stylesheet" />
<link href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" rel="stylesheet" />
<style type="text/css">
<div class="container">
  <h5>Author: Julian Hansen</h5>
  <input type="text" id="dob" />

<script src="http://code.jquery.com/jquery.js"></script>

<!-- Latest compiled and minified JavaScript -->
<script src="js/bootstrap.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
$(function() {
  $('#dob').datepicker(  {changeMonth: true, changeYear: true, yearRange:"c-80:c+0"});

Open in new window

rivkamakAuthor Commented:
It happens when I have a max date like this option
 maxDate: "-7D"
Julian HansenCommented:
It happens when I have a max date like this option
 maxDate: "-7D"
That was not in your original post.

This makes 100% sense. You are saying that you want your control to only allow dates up to one week ago - well one week ago is the 21 Aug - so you will not be allowed to choose September or any other month after 21 Aug 2015.

Change the Year to 2014 and you will see the full set of months is available.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rivkamakAuthor Commented:
can you look at my page.
select a choice from the buttons and then scroll towards the bottom where it asks for the date of birth.
When you select the field, the calendar opens and you have the full list of years.
If let's say I pick 1990, and then the date populates my field.
then I realized it's a mistake and I meant 1991. The year dropdown does not go further than 1990 anymore.
Julian HansenCommented:
Refer to the API Docs
Type: String
Default: "c-10:c+10"
The range of years displayed in the year drop-down: either relative to today's year ("-nn:+nn"), relative to the currently selected year ("c-nn:c+nn"), absolute ("nnnn:nnnn"), or combinations of these formats ("nnnn:-nn"). Note that this option only affects what appears in the drop-down, to restrict which dates may be selected use the minDate and/or maxDate options.

Take the 'c' out of your yearRange option
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.