diff options
author | pheiberg <peter@heiberg.se> | 2010-11-13 22:58:07 +0100 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-11-18 16:13:28 -0500 |
commit | a2e0eb920aaa41e6248e1a2f7d013997ba4f421f (patch) | |
tree | 95011977f27c7d6775ee056fbd0aadbd4f29dd45 /ui | |
parent | 859c87e6d92813c7d99c2ceeaad0ded766c820ea (diff) | |
download | jquery-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.js | 4 |
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) |