Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
datepicker parseDate was passing the failed parse results to the seco…
Browse files Browse the repository at this point in the history
…nd parse try. fixed it.
  • Loading branch information
swilliamset committed Dec 8, 2016
1 parent 764f752 commit 8c1b277
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,13 +395,13 @@
return (true === md.isValid()) ? md.toDate() : BAD_DATE;
};

tryMomentParseAll = function (d, parseFunc1, parseFunc2) {
var pd = parseFunc1(d);
tryMomentParseAll = function (rawDateString, parseFunc1, parseFunc2) {
var pd = parseFunc1(rawDateString);
if (!self.isInvalidDate(pd)) {
return pd;
}

pd = parseFunc2(pd);
pd = parseFunc2(rawDateString);
if (!self.isInvalidDate(pd)) {
return pd;
}
Expand Down

0 comments on commit 8c1b277

Please sign in to comment.