Opened 10 years ago
Closed 10 years ago
#12806 closed bug (notabug)
Datepicker year dropdown not scrollable when changeYear combined with maxDate
Reported by: | stilts75 | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Using a datepicker with both the changeYear and maxDate options causes the year dropdown to be truncated to only show a small number of years (fewer than is limited by maxDate). I would expect to be able to scroll backwards through the list of years as far back as minDate.
I am using Win7 Home Premium SP1. I can reproduce in both IE 9.0.8112.16421 and Chrome 22.0.1229.94 m.
I tried with jQuery v1.8.2 and 1.7.2. I tried with jQuery UI v1.8.18 and v1.9.1.
I have reproduced a simple example below to reproduce (assumes the jQuery and jQuery UI javascript files are in same directory; I've left out any UI files, but get the same issue with custom or pre-made UIs):
<html> <head> <script src="jquery-1.7.2.min.js" type="text/javascript"></script> <script src="jquery-ui-1.9.1.full.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () {
var today = new Date(); $("#dateField").datepicker({
changeMonth: true, changeYear: true, maxDate: new Date(1950, 0, 1), maxDate: today
});
}); </script> </head>
<body> <input type="text" id="dateField" /> </body> </html>
This is not a jQuery core bug. Try asking for help on a forum or StackOverflow.