Skip to content

Commit f961522

Browse files
committed
fix for issue trentrichardson#281 "'Today' fails on plain datepicker control"
1 parent 3e276d3 commit f961522

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

dist/jquery-ui-timepicker-addon.js

+4
Original file line numberDiff line numberDiff line change
@@ -1568,6 +1568,10 @@
15681568
var inst = this._getInst($(id)[0]);
15691569
this._base_gotoToday(id);
15701570
var tp_inst = this._get(inst, 'timepicker');
1571+
if (!tp_inst) {
1572+
return;
1573+
}
1574+
15711575
var tzoffset = $.timepicker.timezoneOffsetNumber(tp_inst.timezone);
15721576
var now = new Date();
15731577
now.setMinutes(now.getMinutes() + now.getTimezoneOffset() + tzoffset);

0 commit comments

Comments
 (0)