mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
datepicker: changed yearRange to be relative to current year instead of selected year (fixes #2627)
This commit is contained in:
parent
0a2cc194d5
commit
dce035cc65
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user