aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorKeith Wood <kbwood.au@gmail.com>2009-11-27 06:17:41 +0000
committerKeith Wood <kbwood.au@gmail.com>2009-11-27 06:17:41 +0000
commit2b12ea0308ff4c8ed563eb51f43991df2d49588b (patch)
tree0e420830a003c9442c67b7233069fdb41d0c691e /ui
parentbfdf9df0ca8e8c53d3201e426d6fb9f280c932e2 (diff)
downloadjquery-ui-2b12ea0308ff4c8ed563eb51f43991df2d49588b.tar.gz
jquery-ui-2b12ea0308ff4c8ed563eb51f43991df2d49588b.zip
Datepicker - Fixed #4956 - undefined variable: lookAhead()
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.datepicker.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 9de0e8ce5..db076090c 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -1157,6 +1157,13 @@ $.extend(Datepicker.prototype, {
_possibleChars: function (format) {
var chars = '';
var literal = false;
+ // Check whether a format character is doubled
+ var lookAhead = function(match) {
+ var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
+ if (matches)
+ iFormat++;
+ return matches;
+ };
for (var iFormat = 0; iFormat < format.length; iFormat++)
if (literal)
if (format.charAt(iFormat) == "'" && !lookAhead("'"))