Skip to content
Permalink
Browse files

datepicker: changed yearRange to be relative to current year instead …

…of selected year (fixes #2627)
  • Loading branch information
1Marc committed Jun 1, 2008
1 parent 0a2cc19 commit dce035cc658a5bcbbeb7e27c6d635882e0617b93
Showing with 3 additions and 3 deletions.
  1. +1 −1 ui/demos/functional/datepicker/debug.html
  2. +2 −2 ui/source/ui.datepicker.js
@@ -1,6 +1,6 @@
<html>
<head>
<html>Only core files for easy debug</html>
<title>Only core files for easy debug</title>
<link rel="stylesheet" href="../../../themes/ui.datepicker.css" type="text/css" media="screen" title="default" charset="utf-8">
</head>
<body>
@@ -1290,8 +1290,8 @@ $.extend(DatepickerInstance.prototype, {
year = drawYear - 10;
endYear = drawYear + 10;
} else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') {
year = drawYear + parseInt(years[0], 10);
endYear = drawYear + parseInt(years[1], 10);
year = new Date().getFullYear() + parseInt(years[0], 10);
endYear = new Date().getFullYear() + parseInt(years[1], 10);
} else {
year = parseInt(years[0], 10);
endYear = parseInt(years[1], 10);

0 comments on commit dce035c

Please sign in to comment.
You can’t perform that action at this time.