summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJulien Sanchez <julien.sanchez@lim.eu>2013-11-25 16:35:24 +0100
committerJulien Sanchez <julien.sanchez@lim.eu>2013-11-25 16:35:24 +0100
commiteeccc8248a7f575d2e4b9251e72a57febccf507c (patch)
tree998a0fd541f15fd21dbbc065f6f367a6d4d20ccb /src
parent11aaecbf7316fd2cf4f3097876278fc438ffc0d0 (diff)
downloadjQuery-Timepicker-Addon-eeccc8248a7f575d2e4b9251e72a57febccf507c.zip
jQuery-Timepicker-Addon-eeccc8248a7f575d2e4b9251e72a57febccf507c.tar.gz
jQuery-Timepicker-Addon-eeccc8248a7f575d2e4b9251e72a57febccf507c.tar.bz2
Fix failure when setting date as null
Otherwise, Timepicker is breaking Datepicker compatibility by not accepting null value.
Diffstat (limited to 'src')
-rw-r--r--src/jquery-ui-timepicker-addon.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jquery-ui-timepicker-addon.js b/src/jquery-ui-timepicker-addon.js
index 1061296..71ec2cd 100644
--- a/src/jquery-ui-timepicker-addon.js
+++ b/src/jquery-ui-timepicker-addon.js
@@ -1611,7 +1611,7 @@
// object will only return the timezone offset for the current locale, so we
// adjust it accordingly. If not using timezone option this won't matter..
// If a timezone is different in tp, keep the timezone as is
- if (tp_inst) {
+ if (tp_inst && tp_date) {
// look out for DST if tz wasn't specified
if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {
tp_inst.timezone = tp_date.getTimezoneOffset() * -1;