-1

I am trying to show year and month where users can select year and month as dropdown from the date-picker but my issue is that the year drop down is not showing all the years when you select it first. For example, when i select the year drop-down, it shows me the years from 2005 to 2025 in the selection. Is there a way to show the scroll-bar when users can use the scroll-bar to go all the way back to 1950 or 1960 when i select the year dropdown?

 <script type="text/javascript">
        $(document).ready(function () {
            $('.datepicker').datepicker({
                changeMonth: true,
                changeYear: true
            });
        });
    </script>
moe
  • 5,149
  • 38
  • 130
  • 197

1 Answers1

0

From the JQuery UI documentation: http://api.jqueryui.com/datepicker/#option-yearRange

add yearRange: "min:max" to your datepicker.

levelonehuman
  • 1,465
  • 14
  • 23