diff options
author | Trent Richardson <trentdrichardson@gmail.com> | 2012-10-23 16:26:44 -0400 |
---|---|---|
committer | Trent Richardson <trentdrichardson@gmail.com> | 2012-10-23 16:26:44 -0400 |
commit | fc34147cd5ddcb01e395462326c8ec8057176ff6 (patch) | |
tree | 876fa87a83e5c4a3e39f394abf775aba223ec320 | |
parent | 8a2a323cba9657e99c17f22cfca35858a75d7b1b (diff) | |
download | jQuery-Timepicker-Addon-fc34147cd5ddcb01e395462326c8ec8057176ff6.zip jQuery-Timepicker-Addon-fc34147cd5ddcb01e395462326c8ec8057176ff6.tar.gz jQuery-Timepicker-Addon-fc34147cd5ddcb01e395462326c8ec8057176ff6.tar.bz2 |
nicolasconnault - Improve error logging
-rw-r--r-- | jquery-ui-timepicker-addon.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index ab49c62..451c5e8 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -304,6 +304,10 @@ }
$.extend(this, parseRes.timeObj);
} catch (err) {
+ $.datepicker.log("Error parsing the date/time string: " + err +
+ "\ndate/time string = " + timeString +
+ "\ntimeFormat = " + this._defaults.timeFormat +
+ "\ndateFormat = " + dp_dateFormat);
return false;
}
return true;
@@ -1487,6 +1491,7 @@ // the "extra" characters. We rely on that instead of
// attempting to perfectly reproduce the parsing algorithm.
date = this._base_parseDate(format, value.substring(0,value.length-(err.length-err.indexOf(':')-2)), settings);
+ $.datepicker.log("Error parsing the date string: " + err + "\ndate string = " + value + "\ndate format = " + format);
}
return date;
};
@@ -1643,6 +1648,14 @@ }
} catch (err) {
+ $.datepicker.log('Could not split the date from the time. Please check the following datetimepicker options' +
+ "\nthrown error: " + err +
+ "\ndateTimeString" + dateTimeString +
+ "\ndateFormat = " + dateFormat +
+ "\nseparator = " + timeSettings.separator +
+ "\ntimeFormat = " + timeSettings.timeFormat +
+ "\nampm = " + timeSettings.ampm);
+
if (err.indexOf(":") >= 0) {
// Hack! The error message ends with a colon, a space, and
// the "extra" characters. We rely on that instead of
|