aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.datepicker.js
diff options
context:
space:
mode:
authorIvan Peters <ivan@ivanpeters.com>2011-01-18 16:25:58 +1300
committerIvan Peters <ivan@ivanpeters.com>2011-01-18 16:25:58 +1300
commit67b070f97a6dc4907cbb5e69b8899c0b5c716684 (patch)
tree989ebe7d66813ea863fb30c05e6c1ed8f8c50cbc /ui/jquery.ui.datepicker.js
parent7608e4a1d604d6215693f88526947ecc61e8b8ed (diff)
downloadjquery-ui-67b070f97a6dc4907cbb5e69b8899c0b5c716684.tar.gz
jquery-ui-67b070f97a6dc4907cbb5e69b8899c0b5c716684.zip
Datepicker: Update parseDate to properly handle a string value in shortYearCutoff. Fixed #6872: parseDate does not default shortYearCutoff correctly.
Diffstat (limited to 'ui/jquery.ui.datepicker.js')
-rw-r--r--ui/jquery.ui.datepicker.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 3ca6a34fb..6b46dcfe2 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -966,6 +966,8 @@ $.extend(Datepicker.prototype, {
if (value == '')
return null;
var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
+ shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
+ new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;