aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorpheiberg <peter@heiberg.se>2010-11-13 22:58:07 +0100
committerScott González <scott.gonzalez@gmail.com>2010-11-18 16:13:28 -0500
commita2e0eb920aaa41e6248e1a2f7d013997ba4f421f (patch)
tree95011977f27c7d6775ee056fbd0aadbd4f29dd45 /ui
parent859c87e6d92813c7d99c2ceeaad0ded766c820ea (diff)
downloadjquery-ui-a2e0eb920aaa41e6248e1a2f7d013997ba4f421f.tar.gz
jquery-ui-a2e0eb920aaa41e6248e1a2f7d013997ba4f421f.zip
Datepicker: Fixed parsing of single y character for date formats. Fixes #6659 - Datepicker: Date format ymmdd not parsed correctly.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.datepicker.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 110e9d6f8..961e1780d 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -983,9 +983,9 @@ $.extend(Datepicker.prototype, {
};
// Extract a number from the string value
var getNumber = function(match) {
- lookAhead(match);
+ var isDoubled = lookAhead(match);
var size = (match == '@' ? 14 : (match == '!' ? 20 :
- (match == 'y' ? 4 : (match == 'o' ? 3 : 2))));
+ (match == 'y' && isDoubled ? 4 : (match == 'o' ? 3 : 2))));
var digits = new RegExp('^\\d{1,' + size + '}');
var num = value.substring(iValue).match(digits);
if (!num)