Skip to content

Commit 2b12ea0

Browse files
committed
Datepicker - Fixed #4956 - undefined variable: lookAhead()
1 parent bfdf9df commit 2b12ea0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,13 @@ $.extend(Datepicker.prototype, {
11571157
_possibleChars: function (format) {
11581158
var chars = '';
11591159
var literal = false;
1160+
// Check whether a format character is doubled
1161+
var lookAhead = function(match) {
1162+
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
1163+
if (matches)
1164+
iFormat++;
1165+
return matches;
1166+
};
11601167
for (var iFormat = 0; iFormat < format.length; iFormat++)
11611168
if (literal)
11621169
if (format.charAt(iFormat) == "'" && !lookAhead("'"))

0 commit comments

Comments
 (0)