Skip to content

Commit 7d0a7ed

Browse files
committed
Merge pull request #2633 from PenghaiZhang/bugfix/calendar-control-year-limit
Ensure the year range of Wizard Calendar starts from 1970
1 parent 753a3ab commit 7d0a7ed

File tree

1 file changed

+7
-7
lines changed
  • Source/Plugins/Core/com.equella.core/resources/web/js

1 file changed

+7
-7
lines changed

Source/Plugins/Core/com.equella.core/resources/web/js/datepicker.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
$.datepicker.setDefaults({
77
showOn : 'both',
8-
yearRange : "c-50:c+10",
8+
yearRange : "1970:c+10",
99
changeYear : true,
1010
changeMonth : true,
1111
constrainInput : true,
@@ -32,7 +32,7 @@ function disablePicker($jelem, disabled)
3232
}
3333

3434
/**
35-
*
35+
*
3636
* @param $jelem
3737
* @param $hiddenElem
3838
* @param timezoneOffset
@@ -56,7 +56,7 @@ function setupPicker($jelem, $hiddenElem, timezoneOffset, changeFunc, $otherCale
5656
showButtonPanel : false,
5757
buttonText : buttonText
5858
};
59-
59+
6060
$jelem.datepicker(settings);
6161
$jelem.data('$hiddenElem', $hiddenElem);
6262

@@ -175,7 +175,7 @@ function stripExtras($dp)
175175
}
176176

177177
/**
178-
*
178+
*
179179
* @param $elem
180180
* @param timezoneOffset
181181
* @returns A UTC date which is Midnight *our* time
@@ -189,13 +189,13 @@ function getPickerUiValue($elem, timezoneOffset)
189189
// Convert to midnight our time
190190
// var toff2 = new Date(dtUtc).getTimezoneOffset() * 60000;
191191
return dtUtc; /* - toff2 */
192-
;
192+
193193
}
194194
return null;
195195
}
196196

197197
/**
198-
*
198+
*
199199
* @param $elem
200200
* @param utcDate
201201
* A UTC date which is Midnight *our* time
@@ -238,4 +238,4 @@ function setPickerHiddenValue($elem, utcDate)
238238
{
239239
$elem.data('$hiddenElem').val('');
240240
}
241-
}
241+
}

0 commit comments

Comments
 (0)