Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DavyLandman/907887 to your computer and use it in GitHub Desktop.
Save DavyLandman/907887 to your computer and use it in GitHub Desktop.
This just feels dirty :)
// Add support for an alternative (second) dateFormat to the jQuery datepicker
(function () {
var oldMethod = $.datepicker.parseDate;
$.datepicker.parseDate = function () {
var dateValue = Date.parseExact(arguments[1], 'ddMMyyyy');
if (dateValue) {
return dateValue;
}
return oldMethod.apply(this, arguments);
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment