Fix for altField option when using inline picker
This commit is contained in:
parent
c1d7c5a106
commit
60ffcebe5c
13
jquery-ui-timepicker-addon.js
vendored
13
jquery-ui-timepicker-addon.js
vendored
|
@ -125,13 +125,7 @@ $.extend(Timepicker.prototype, {
|
|||
}
|
||||
}
|
||||
tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, o, {
|
||||
beforeShow: function(input, dp_inst) {
|
||||
if (o.altField)
|
||||
tp_inst.$altInput = $($.datepicker._get(dp_inst, 'altField'))
|
||||
.css({ cursor: 'pointer' })
|
||||
.focus(function(){
|
||||
$input.trigger("focus");
|
||||
});
|
||||
beforeShow: function(input, dp_inst) {
|
||||
if ($.isFunction(o.beforeShow))
|
||||
o.beforeShow(input, dp_inst);
|
||||
},
|
||||
|
@ -150,6 +144,11 @@ $.extend(Timepicker.prototype, {
|
|||
timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker');
|
||||
});
|
||||
|
||||
if (o.altField)
|
||||
tp_inst.$altInput = $(o.altField)
|
||||
.css({ cursor: 'pointer' })
|
||||
.focus(function(){ $input.trigger("focus"); });
|
||||
|
||||
// datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime..
|
||||
if(tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date)
|
||||
tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime());
|
||||
|
|
Loading…
Reference in a new issue