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

Commit fc34147

Browse files
nicolasconnault - Improve error logging
1 parent 8a2a323 commit fc34147

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

jquery-ui-timepicker-addon.js

+13
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,10 @@
304304
}
305305
$.extend(this, parseRes.timeObj);
306306
} catch (err) {
307+
$.datepicker.log("Error parsing the date/time string: " + err +
308+
"\ndate/time string = " + timeString +
309+
"\ntimeFormat = " + this._defaults.timeFormat +
310+
"\ndateFormat = " + dp_dateFormat);
307311
return false;
308312
}
309313
return true;
@@ -1487,6 +1491,7 @@
14871491
// the "extra" characters. We rely on that instead of
14881492
// attempting to perfectly reproduce the parsing algorithm.
14891493
date = this._base_parseDate(format, value.substring(0,value.length-(err.length-err.indexOf(':')-2)), settings);
1494+
$.datepicker.log("Error parsing the date string: " + err + "\ndate string = " + value + "\ndate format = " + format);
14901495
}
14911496
return date;
14921497
};
@@ -1643,6 +1648,14 @@
16431648
}
16441649

16451650
} catch (err) {
1651+
$.datepicker.log('Could not split the date from the time. Please check the following datetimepicker options' +
1652+
"\nthrown error: " + err +
1653+
"\ndateTimeString" + dateTimeString +
1654+
"\ndateFormat = " + dateFormat +
1655+
"\nseparator = " + timeSettings.separator +
1656+
"\ntimeFormat = " + timeSettings.timeFormat +
1657+
"\nampm = " + timeSettings.ampm);
1658+
16461659
if (err.indexOf(":") >= 0) {
16471660
// Hack! The error message ends with a colon, a space, and
16481661
// the "extra" characters. We rely on that instead of

0 commit comments

Comments
 (0)