diff options
Diffstat (limited to 'ui/datepicker.js')
-rw-r--r-- | ui/datepicker.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/datepicker.js b/ui/datepicker.js index 10b7d7eb5..46b6a5f4d 100644 --- a/ui/datepicker.js +++ b/ui/datepicker.js @@ -1138,7 +1138,8 @@ $.extend(Datepicker.prototype, { var isDoubled = lookAhead(match), size = (match === "@" ? 14 : (match === "!" ? 20 : (match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))), - digits = new RegExp("^\\d{1," + size + "}"), + minSize = (match === "y" ? size : 1), + digits = new RegExp("^\\d{" + minSize + "," + size + "}"), num = value.substring(iValue).match(digits); if (!num) { throw "Missing number at position " + iValue; |